date: check for "local" before anything else
[gitweb.git] / streaming.c
index 2ff036a0fa6c8e7b013d061d16baf33045305950..811fcc24d2a8ba56c233ae4e37b7acac29a4a0d8 100644 (file)
@@ -507,8 +507,11 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f
        int result = -1;
 
        st = open_istream(sha1, &type, &sz, filter);
-       if (!st)
+       if (!st) {
+               if (filter)
+                       free_stream_filter(filter);
                return result;
+       }
        if (type != OBJ_BLOB)
                goto close_and_exit;
        for (;;) {