diff options
| author | Brodie Rao <brodie@sf.io> | 2014-01-12 23:31:13 -0800 |
|---|---|---|
| committer | Brodie Rao <brodie@sf.io> | 2014-01-12 23:33:59 -0800 |
| commit | ae3b6d612db6305a20e1139503b3c9e99cf4632a (patch) | |
| tree | 727c30dd0e597698cfed12f48d755de80410da44 /src | |
| parent | e3c6a1bf02227cf996a5c0da784124ddea5c1ba6 (diff) | |
| download | libgit2-ae3b6d612db6305a20e1139503b3c9e99cf4632a.tar.gz | |
odb: handle NULL pointers passed to git_odb_stream_free
Signed-off-by: Brodie Rao <brodie@sf.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/odb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -949,6 +949,9 @@ int git_odb_stream_read(git_odb_stream *stream, char *buffer, size_t len) void git_odb_stream_free(git_odb_stream *stream) { + if (stream == NULL) + return; + git__free(stream->hash_ctx); stream->free(stream); } |
