]> granicus.if.org Git - file/commitdiff
add missing regfree() from Dmitry V. Levin" <ldv@altlinux.org>
authorChristos Zoulas <christos@zoulas.com>
Tue, 9 Mar 2004 18:49:58 +0000 (18:49 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 9 Mar 2004 18:49:58 +0000 (18:49 +0000)
src/softmagic.c

index 6de903b8c3a873befc21227cf07b5e282c475bb6..ef37dfdc625ee9a7e62bbf9d549a358e87553916 100644 (file)
@@ -44,7 +44,7 @@
 
 
 #ifndef        lint
-FILE_RCSID("@(#)$Id: softmagic.c,v 1.64 2003/12/31 18:36:22 christos Exp $")
+FILE_RCSID("@(#)$Id: softmagic.c,v 1.65 2004/03/09 18:49:58 christos Exp $")
 #endif /* lint */
 
 private int match(struct magic_set *, struct magic *, uint32_t,
@@ -1112,6 +1112,7 @@ mcheck(struct magic_set *ms, union VALUETYPE *p, struct magic *m)
                        return -1;
                } else {
                        rc = regexec(&rx, p->buf, 0, 0, 0);
+                       regfree(&rx);
                        free(p->buf);
                        return !rc;
                }