Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
update-index: fix a memleak
author
Stefan Beller
<sbeller@google.com>
Sat, 21 Mar 2015 00:28:01 +0000
(17:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 22 Mar 2015 19:26:31 +0000
(12:26 -0700)
`old` is not used outside the loop and would get lost
once we reach the goto.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
2d9426b
)
diff --git
a/builtin/update-index.c
b/builtin/update-index.c
index 587898624c0550749a9a241e2742785f20ec1bd5..6271b54adc24c8765ca0b179faf53f6af86dc630 100644
(file)
--- a/
builtin/update-index.c
+++ b/
builtin/update-index.c
@@
-584,6
+584,7
@@
static int do_reupdate(int ac, const char **av,
path = xstrdup(ce->name);
update_one(path);
free(path);
+ free(old);
if (save_nr != active_nr)
goto redo;
}