diff options
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -45,13 +45,12 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | if (ctx.repo->source_filter) { | 47 | if (ctx.repo->source_filter) { |
48 | char *filter_arg = xstrdup(name); | ||
48 | html("<td class='lines'><pre><code>"); | 49 | html("<td class='lines'><pre><code>"); |
49 | ctx.repo->source_filter->argv[1] = xstrdup(name); | 50 | cgit_open_filter(ctx.repo->source_filter, filter_arg); |
50 | cgit_open_filter(ctx.repo->source_filter); | ||
51 | html_raw(buf, size); | 51 | html_raw(buf, size); |
52 | cgit_close_filter(ctx.repo->source_filter); | 52 | cgit_close_filter(ctx.repo->source_filter); |
53 | free(ctx.repo->source_filter->argv[1]); | 53 | free(filter_arg); |
54 | ctx.repo->source_filter->argv[1] = NULL; | ||
55 | html("</code></pre></td></tr></table>\n"); | 54 | html("</code></pre></td></tr></table>\n"); |
56 | return; | 55 | return; |
57 | } | 56 | } |