diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-07-02 10:18:40 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-07-02 10:21:48 -0500 |
commit | 79306d8d59b3a7abeac379005f41fa9c63cca50b (patch) | |
tree | 54b13631e05031e1f467bbcb4f3ddca2ed50ec6a | |
parent | aa92c318a235cc6a5230682b9c071eb35f9c5f4c (diff) | |
download | libgit2-79306d8d59b3a7abeac379005f41fa9c63cca50b.tar.gz |
filter::stream: free the filter sanely
Don't use the filter's free callback to free the actual data structure
holding the filter, as we may not always actually initialize it (the
test may be skipped).
-rw-r--r-- | tests/filter/stream.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/filter/stream.c b/tests/filter/stream.c index 603f19494..6bf540ce7 100644 --- a/tests/filter/stream.c +++ b/tests/filter/stream.c @@ -25,6 +25,7 @@ void test_filter_stream__cleanup(void) g_repo = NULL; git_filter_unregister("compress"); + git__free(compress_filter); } #define CHUNKSIZE 10240 @@ -123,11 +124,6 @@ static int compress_filter_stream_init( return 0; } -static void compress_filter_free(git_filter *f) -{ - git__free(f); -} - git_filter *create_compress_filter(void) { git_filter *filter = git__calloc(1, sizeof(git_filter)); @@ -136,7 +132,6 @@ git_filter *create_compress_filter(void) filter->version = GIT_FILTER_VERSION; filter->attributes = "+compress"; filter->stream = compress_filter_stream_init; - filter->shutdown = compress_filter_free; return filter; } |