From mboxrd@z Thu Jan 1 00:00:00 1970 From: kupcevic@sourceware.org Date: 23 Sep 2006 09:26:58 -0000 Subject: [Cluster-devel] conga/ricci/modules/storage FileMagic.cpp Message-ID: <20060923092658.21495.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- conga/ricci/modules/storage/FileMagic.cpp 2006/09/14 17:57:56 1.2 +++ conga/ricci/modules/storage/FileMagic.cpp 2006/09/23 09:26:58 1.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; } }