func: void bad() HANDLE data ; data = CreateFile ( "BadSource_w32CreateFile.txt" , ( GENERIC_WRITE | GENERIC_READ ) , 0 , NULL , OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL ); dataMap [ 0 ] = data; dataMap [ 1 ] = data; dataMap [ 2 ] = data; badSink ( dataMap ); void badSink(map<int, HANDLE> dataMap) HANDLE data = dataMap [ 2 ] ; if ( data != INVALID_HANDLE_VALUE )  _close ( ( int ) data ); 