]> granicus.if.org Git - file/commitdiff
make sure we free everything.
authorChristos Zoulas <christos@zoulas.com>
Tue, 7 Apr 2009 11:07:00 +0000 (11:07 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 7 Apr 2009 11:07:00 +0000 (11:07 +0000)
src/funcs.c

index 167ce851f221c39edcb27331af091b53b138f673..1fb74228ee254f4e5b8e126ad397f423be389de9 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.51 2008/11/07 18:57:28 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.52 2009/02/13 18:24:18 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -307,6 +307,10 @@ file_reset(struct magic_set *ms)
                free(ms->o.buf);
                ms->o.buf = NULL;
        }
+       if (ms->o.pbuf) {
+               free(ms->o.pbuf);
+               ms->o.pbuf = NULL;
+       }
        ms->event_flags &= ~EVENT_HAD_ERR;
        ms->error = -1;
        return 0;