Merge branch 'jc/streaming-filter'
authorJunio C Hamano <gitster@pobox.com>
Mon, 1 Aug 2011 22:00:29 +0000 (15:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Aug 2011 22:00:29 +0000 (15:00 -0700)
* jc/streaming-filter:
streaming: free git_istream upon closing

1  2 
streaming.c
diff --combined streaming.c
index 25c9a209bb1ba9cec8bb49623ae45fc19fdca2c7,d8c16d28f6c5ee56fcdc03f2db1b4f0630df3c5d..71072e1b1da670cdb4b048a3a6e83a4ae806bf5f
@@@ -66,7 -66,7 +66,7 @@@ struct filtered_istream 
  struct git_istream {
        const struct stream_vtbl *vtbl;
        unsigned long size; /* inflated size of full object */
 -      z_stream z;
 +      git_zstream z;
        enum { z_unused, z_used, z_done, z_error } z_state;
  
        union {
@@@ -94,7 -94,9 +94,9 @@@
  
  int close_istream(struct git_istream *st)
  {
-       return st->vtbl->close(st);
+       int r = st->vtbl->close(st);
+       free(st);
+       return r;
  }
  
  ssize_t read_istream(struct git_istream *st, char *buf, size_t sz)