projects
/
file
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d70bb13
)
fix memory leak on error (delphij)
author
Christos Zoulas
<christos@zoulas.com>
Mon, 13 Jun 2016 12:02:06 +0000
(12:02 +0000)
committer
Christos Zoulas
<christos@zoulas.com>
Mon, 13 Jun 2016 12:02:06 +0000
(12:02 +0000)
src/softmagic.c
patch
|
blob
|
history
diff --git
a/src/softmagic.c
b/src/softmagic.c
index 2754cd1690567ee542bbb79e1a05366efd6131fb..644c9d98d4aa9b5a254ab16feb1347727128f108 100644
(file)
--- a/
src/softmagic.c
+++ b/
src/softmagic.c
@@
-32,7
+32,7
@@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.23
3 2016/06/01 22:04:10
christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.23
4 2016/06/13 12:02:06
christos Exp $")
#endif /* lint */
#include "magic.h"
@@
-2080,6
+2080,7
@@
magiccheck(struct magic_set *ms, struct magic *m)
if (slen != 0) {
copy = malloc(slen);
if (copy == NULL) {
+ file_regfree(&rx);
file_error(ms, errno,
"can't allocate %" SIZE_T_FORMAT "u bytes",
slen);