diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2011-08-03 19:54:03 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-03 11:23:09 -0700 |
commit | ec99c9a89a65749093e16aed37d393f646597b31 (patch) | |
tree | 4b5457300e261960a65d5bb883db933aaa566249 /compat/fnmatch/fnmatch.c | |
parent | test: skip clean-up when running under --immediate mode (diff) | |
download | tgif-ec99c9a89a65749093e16aed37d393f646597b31.tar.xz |
http.c: fix an invalid free()
Remove a free() on the static buffer returned by sha1_file_name().
While we're at it, replace xmalloc() calls on the structs
http_(object|pack)_request with xcalloc() so that pointers in the
structs get initialized to NULL. That way, free()'s are safe - for
example, a free() on the url string member when aborting.
This fixes an invalid free().
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Jeff King peff@peff.net
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/fnmatch/fnmatch.c')
0 files changed, 0 insertions, 0 deletions