git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
31d8738
)
grep: Fix two memory leaks
author
Dan McGee
<redacted>
Sat, 30 Jan 2010 15:42:58 +0000
(09:42 -0600)
committer
Junio C Hamano
<redacted>
Sat, 30 Jan 2010 17:11:00 +0000
(09:11 -0800)
We duplicate the grep_opt structure when using grep threads, but didn't
later free either the patterns attached to this new structure or the
structure itself.
Signed-off-by: Dan McGee <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin-grep.c
patch
|
blob
|
history
diff --git
a/builtin-grep.c
b/builtin-grep.c
index 9bd467c9b90d1c58a59e27fbc6673cb68d855c72..0ef849cb84650705ffc840aed8a3fcedbeb48f9a 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-205,6
+205,8
@@
static void *run(void *arg)
work_done(w);
}
+ free_grep_patterns(arg);
+ free(arg);
return (void*) (intptr_t) hit;
}
git clone https://git.99rst.org/PROJECT