prune-packed: fix minor memory leak
authorJeff King <peff@peff.net>
Sat, 13 Sep 2014 20:16:53 +0000 (16:16 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Sep 2014 18:37:43 +0000 (11:37 -0700)
We form all of our directories in a strbuf, but never release it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/prune-packed.c

index 6879468..d430731 100644 (file)
@@ -68,6 +68,7 @@ void prune_packed_objects(int opts)
                rmdir(pathname.buf);
        }
        stop_progress(&progress);
                rmdir(pathname.buf);
        }
        stop_progress(&progress);
+       strbuf_release(&pathname);
 }
 
 int cmd_prune_packed(int argc, const char **argv, const char *prefix)
 }
 
 int cmd_prune_packed(int argc, const char **argv, const char *prefix)