summaryrefslogtreecommitdiff
path: root/xdiff-interface.h
diff options
context:
space:
mode:
authorLibravatar John Keeping <john@keeping.me.uk>2015-03-30 18:22:11 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-31 12:14:42 -0700
commit9ce4ad3e0eac33b4cae38ebd76c26ddba2468631 (patch)
tree2cdf4771051cd839933373ac9088842d8f4bd1ea /xdiff-interface.h
parentstreaming: make streaming-write-entry to be more reusable (diff)
downloadtgif-9ce4ad3e0eac33b4cae38ebd76c26ddba2468631.tar.xz
streaming.c: fix a memleak
When stream_blob_to_fd() opens an input stream with a filter, the filter gets discarded upon calling close_istream() before the function returns in the normal case. However, when we fail to open the stream, we failed to discard the filter. By discarding the filter in the failure case, give a consistent life-time rule of the filter to the callers; otherwise the callers need to conditionally discard the filter themselves, and this function does not give enough hint for the caller to do so correctly. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.h')
0 files changed, 0 insertions, 0 deletions