diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:49 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:49 -0700 |
| commit | 50eb005eb371723704024c656da60a2c37658945 (patch) | |
| tree | f566eee43e7299119a16c311ad1abadc78d6c0e9 /tree-diff.c | |
| parent | Merge branch 'jt/submodule-name-to-gitdir' (diff) | |
| parent | t0000: avoid masking git exit value through pipes (diff) | |
| download | git-50eb005eb371723704024c656da60a2c37658945.tar.gz git-50eb005eb371723704024c656da60a2c37658945.zip | |
Merge branch 'cb/plug-leaks-in-alloca-emu-users'
Leakfix.
* cb/plug-leaks-in-alloca-emu-users:
t0000: avoid masking git exit value through pipes
tree-diff: fix leak when not HAVE_ALLOCA_H
Diffstat (limited to 'tree-diff.c')
| -rw-r--r-- | tree-diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tree-diff.c b/tree-diff.c index 1572615bd9..437c98a70e 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -21,7 +21,9 @@ ALLOC_ARRAY((x), nr); \ } while(0) #define FAST_ARRAY_FREE(x, nr) do { \ - if ((nr) > 2) \ + if ((nr) <= 2) \ + xalloca_free((x)); \ + else \ free((x)); \ } while(0) |
