summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06cd3b9)
raw | patch | inline | side by side (parent: 06cd3b9)
author | Ingo Molnar <mingo@elte.hu> | |
Thu, 14 Apr 2005 10:35:27 +0000 (12:35 +0200) | ||
committer | Petr Baudis <xpasky@machine.sinus.cz> | |
Wed, 11 May 2005 21:05:47 +0000 (23:05 +0200) |
this patch fixes another (very rare) memory leak in checkout-cache.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
checkout-cache.c | patch | blob | history |
diff --git a/checkout-cache.c b/checkout-cache.c
index 64ce92147fdf200798be2578ddb051f9115a7ba5..b561ef487ee093207ba2034e1142614276d1e5a9 100644 (file)
--- a/checkout-cache.c
+++ b/checkout-cache.c
new = read_sha1_file(ce->sha1, type, &size);
if (!new || strcmp(type, "blob")) {
+ if (new)
+ free(new);
return error("checkout-cache: unable to read sha1 file of %s (%s)",
path, sha1_to_hex(ce->sha1));
}