summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-02-09 09:58:56 +0100
committerPatrick Steinhardt <ps@pks.im>2016-02-09 09:58:56 +0100
commita53d2e3985505de0e1dcc580cd2c624fcf0fce93 (patch)
treee4b1a7a45e39c1d878b9f001df879072b21d5407 /src/commit.c
parente0bbe78134007747dcfd0164a2604a68d31e95c8 (diff)
downloadlibgit2-a53d2e3985505de0e1dcc580cd2c624fcf0fce93.tar.gz
pack: do not free passed in poiter on error
The function `git_packfile_stream_open` tries to free the passed in stream when an error occurs. The only call site is `git_indexer_append`, though, which passes in the address of a stream struct which has not been allocated on the heap. Fix the issue by simply removing the call to free. In case of an error we did not allocate any memory yet and otherwise it should be the caller's responsibility to manage it's object's lifetime.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions