]> git.armaanb.net Git - stagit.git/commitdiff
fix memory leak of blob object
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 12 Mar 2017 18:50:12 +0000 (19:50 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 12 Mar 2017 20:22:52 +0000 (21:22 +0100)
stagit.c

index c3693c70d769c8a428f8400d009e2f546a293864..a99e18b20977c75b7237302881a572700df34a02 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -839,6 +839,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
                        else
                                fprintf(fp, "%juB", (uintmax_t)filesize);
                        fputs("</td></tr>\n", fp);
+                       git_object_free(obj);
                } else if (!git_submodule_lookup(&module, repo, entryname)) {
                        fprintf(fp, "<tr><td>m---------</td><td><a href=\"%sfile/.gitmodules.html\">",
                                relpath);