func: static void goodG2B() int * data ; map < int , int * > dataMap ; data = NULL; int * dataBuffer = ( int * ) malloc ( 100 * sizeof ( int ) ) ; size_t i ; for (i = 0; i < 100; i++) dataBuffer [ i ] = 5; data = dataBuffer; dataMap [ 0 ] = data; dataMap [ 1 ] = data; dataMap [ 2 ] = data; goodG2BSink ( dataMap ); void goodG2BSink(map<int, int *> dataMap) int * data = dataMap [ 2 ] ; free ( data ); 