Commit a551bfca authored by Bill Hoffman's avatar Bill Hoffman
Browse files

fix free before use

parent 11e80e26
......@@ -294,10 +294,11 @@ const char* cmDynamicLoader::LastError()
);
// Free the buffer.
LocalFree( lpMsgBuf );
static char* str = 0;
delete [] str;
str = strcpy(new char[strlen((char*)lpMsgBuf)+1], (char*)lpMsgBuf);
str = strcpy(new char[strlen((char*)lpMsgBuf)+1], (char*)lpMsgBuf);
LocalFree( lpMsgBuf );
return str;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment