summaryrefslogtreecommitdiffabout
path: root/shared.c
Side-by-side diff
Diffstat (limited to 'shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared.c b/shared.c
index 7cf1e59..06f70bb 100644
--- a/shared.c
+++ b/shared.c
@@ -61,2 +61,3 @@ struct cgit_repo *cgit_add_repo(const char *url)
ret->enable_remote_branches = ctx.cfg.enable_remote_branches;
+ ret->enable_subject_links = ctx.cfg.enable_subject_links;
ret->max_stats = ctx.cfg.max_stats;
@@ -281,2 +282,6 @@ int cgit_diff_files(const unsigned char *old_sha1,
*binary = 1;
+ if (file1.size)
+ free(file1.ptr);
+ if (file2.size)
+ free(file2.ptr);
return 0;
@@ -293,2 +298,6 @@ int cgit_diff_files(const unsigned char *old_sha1,
xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb);
+ if (file1.size)
+ free(file1.ptr);
+ if (file2.size)
+ free(file2.ptr);
return 0;