Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4998 Discussions

Mismatched allocation/deallocation gzlib.c

erling_andersen
New Contributor I
290 Views
The following code if zlib. Now the 
 
  free(Path)
 
gives me the warning
 
P2 Mismatched allocation/deallocation gzlib.c; malloc_base.cpp mosek64_9_0.dll New
Why????
 
<pre>
293     if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
294         return NULL;
295 #if !defined(NO_snprintf) && !defined(NO_vsnprintf)
296     (void)snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd);
297 #else
298     sprintf(path, "<fd:%d>", fd);   /* for debugging */
299 #endif
300     gz = gz_open(path, fd, mode);
301     free(path);
</pre>
0 Kudos
0 Replies
Reply