From: Carlos Martín Nieto Date: Thu, 31 Mar 2011 15:10:41 GMT Subject: [PATCH 1/2] cmd_clone: free dir and path buffers Message-ID: <1301584242-3193-1-git-send-email-cmn@elego.de> In-Reply-To: <1301583996.11592.3.camel@bee.lab.cmartin.tk> The variables dir and path are always allocated on the heap so it's always safe to free them. This memory would be freed by _exit, but it's good form to free memory you've allocated. Signed-off-by: Carlos Martín Nieto --- Hopefully this time there are no silly mistakes. builtin/clone.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c index 2ee1fa9..fe0408c 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -665,6 +665,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) err = run_command_v_opt(argv_submodule, RUN_GIT_CMD); } + free(dir); + free(path); strbuf_release(&reflog_msg); strbuf_release(&branch_top); strbuf_release(&key); -- 1.7.4.1