Skip to contentSkip to conversation

conga/ricci/modules/storage FileMagic.cpp

Cluster-devel [email protected] 1 participant 1 message Sep 23, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-09-23 09:26:58

Modified files:
ricci/modules/storage: FileMagic.cpp

Log message:
storage module: don't free libmagic's return buffer - double free

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/FileMagic.cpp.diff?cvsroot=cluster&r1=1.2&r2=1.3

ricci/modules/storage/FileMagic.cpp +3 -3
@@ -56,14 +56,14 @@
       throw String("unknown data detected");
     
     magic_close(cookie); cookie = 0;
-    free((char*) buff); buff = 0;
+    //    free((char*) buff); buff = 0;
     
     return descr;
   } catch ( ... ) {
     if (cookie)
       magic_close(cookie);
-    if (buff)
-      free((char*) buff);
+    //    if (buff)
+    //      free((char*) buff);
     throw;
   }
 }