{"thread":{"id":"22650","subject":"[PATCH] fix minor memory leak in get_tree_entry()","startedAt":"2010-02-14T09:56:46Z","lastAt":"2010-02-15T04:43:49Z","messageCount":2,"participants":["René Scharfe","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"134524","messageId":"4B77C8DE.5070503@lsrfire.ath.cx","threadId":"22650","inReplyTo":null,"subject":"[PATCH] fix minor memory leak in get_tree_entry()","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-02-14T09:56:46Z","receivedAt":"2010-02-14T09:56:46Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n tree-walk.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/tree-walk.c b/tree-walk.c\nindex 08796c2..67a9a0c 100644\n--- a/tree-walk.c\n+++ b/tree-walk.c\n@@ -441,6 +441,7 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch\n \n \tif (name[0] == '\\0') {\n \t\thashcpy(sha1, root);\n+\t\tfree(tree);\n \t\treturn 0;\n \t}\n \n-- \n1.7.0\n"},{"id":"134601","messageId":"20100215044349.GB3336@coredump.intra.peff.net","threadId":"22650","inReplyTo":"4B77C8DE.5070503@lsrfire.ath.cx","subject":"Re: [PATCH] fix minor memory leak in get_tree_entry()","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-02-15T04:43:49Z","receivedAt":"2010-02-15T04:43:49Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Feb 14, 2010 at 10:56:46AM +0100, René Scharfe wrote:\n\n> diff --git a/tree-walk.c b/tree-walk.c\n> index 08796c2..67a9a0c 100644\n> --- a/tree-walk.c\n> +++ b/tree-walk.c\n> @@ -441,6 +441,7 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch\n>  \n>  \tif (name[0] == '\\0') {\n>  \t\thashcpy(sha1, root);\n> +\t\tfree(tree);\n>  \t\treturn 0;\n>  \t}\n\nOops. Good catch.\n\nAcked-by: Jeff King <peff@peff.net>\n\n-Peff\n"}]}