]> git.cameronkatri.com Git - cgit.git/commitdiff
source_filter: fix a memory leak
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 9 Mar 2011 07:16:58 +0000 (08:16 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sat, 26 Mar 2011 14:13:35 +0000 (15:13 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-tree.c

index 0b1b531494c4f24c059d4b80cf7d6faaf8612d0d..442b6be53d2c6ba6f7f4c17cd53d12da198c6f5d 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -48,6 +48,8 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
                cgit_open_filter(ctx.repo->source_filter);
                html_raw(buf, size);
                cgit_close_filter(ctx.repo->source_filter);
+               free(ctx.repo->source_filter->argv[1]);
+               ctx.repo->source_filter->argv[1] = NULL;
                html("</code></pre></td></tr></table>\n");
                return;
        }