Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
commit.c: fix a memory leak
author
Stefan Beller
<sbeller@google.com>
Sat, 21 Mar 2015 00:28:07 +0000
(17:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 23 Mar 2015 18:12:58 +0000
(11:12 -0700)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
e280888
)
diff --git
a/builtin/commit.c
b/builtin/commit.c
index 961e467242747dac07aa6f5e619e2d1a50570b06..da79ac4bc7a7247017e2f952b35642a1976c8101 100644
(file)
--- a/
builtin/commit.c
+++ b/
builtin/commit.c
@@
-229,7
+229,7
@@
static int commit_index_files(void)
static int list_paths(struct string_list *list, const char *with_tree,
const char *prefix, const struct pathspec *pattern)
{
- int i;
+ int i
, ret
;
char *m;
if (!pattern->nr)
@@
-256,7
+256,9
@@
static int list_paths(struct string_list *list, const char *with_tree,
item->util = item; /* better a valid pointer than a fake one */
}
- return report_path_error(m, pattern, prefix);
+ ret = report_path_error(m, pattern, prefix);
+ free(m);
+ return ret;
}
static void add_remove_files(struct string_list *list)