]> 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 b7318bdab871c0714f6ec8ecb46159e5b2f0cc58..c6f0d09c54978d1259e405fcc7854264b33895d6 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.52 2009/02/13 18:24:18 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.53 2009/04/07 11:07:00 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;