diff options
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -59,6 +59,7 @@ struct cgit_repo *cgit_add_repo(const char *url) | |||
59 | ret->enable_log_filecount = ctx.cfg.enable_log_filecount; | 59 | ret->enable_log_filecount = ctx.cfg.enable_log_filecount; |
60 | ret->enable_log_linecount = ctx.cfg.enable_log_linecount; | 60 | ret->enable_log_linecount = ctx.cfg.enable_log_linecount; |
61 | ret->enable_remote_branches = ctx.cfg.enable_remote_branches; | 61 | ret->enable_remote_branches = ctx.cfg.enable_remote_branches; |
62 | ret->enable_subject_links = ctx.cfg.enable_subject_links; | ||
62 | ret->max_stats = ctx.cfg.max_stats; | 63 | ret->max_stats = ctx.cfg.max_stats; |
63 | ret->module_link = ctx.cfg.module_link; | 64 | ret->module_link = ctx.cfg.module_link; |
64 | ret->readme = NULL; | 65 | ret->readme = NULL; |
@@ -278,6 +279,10 @@ int cgit_diff_files(const unsigned char *old_sha1, | |||
278 | if ((file1.ptr && buffer_is_binary(file1.ptr, file1.size)) || | 279 | if ((file1.ptr && buffer_is_binary(file1.ptr, file1.size)) || |
279 | (file2.ptr && buffer_is_binary(file2.ptr, file2.size))) { | 280 | (file2.ptr && buffer_is_binary(file2.ptr, file2.size))) { |
280 | *binary = 1; | 281 | *binary = 1; |
282 | if (file1.size) | ||
283 | free(file1.ptr); | ||
284 | if (file2.size) | ||
285 | free(file2.ptr); | ||
281 | return 0; | 286 | return 0; |
282 | } | 287 | } |
283 | 288 | ||
@@ -290,6 +295,10 @@ int cgit_diff_files(const unsigned char *old_sha1, | |||
290 | emit_cb.outf = filediff_cb; | 295 | emit_cb.outf = filediff_cb; |
291 | emit_cb.priv = fn; | 296 | emit_cb.priv = fn; |
292 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); | 297 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); |
298 | if (file1.size) | ||
299 | free(file1.ptr); | ||
300 | if (file2.size) | ||
301 | free(file2.ptr); | ||
293 | return 0; | 302 | return 0; |
294 | } | 303 | } |
295 | 304 | ||