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; |
@@ -279,6 +280,10 @@ int cgit_diff_files(const unsigned char *old_sha1, | |||
279 | if ((file1.ptr && buffer_is_binary(file1.ptr, file1.size)) || | 280 | if ((file1.ptr && buffer_is_binary(file1.ptr, file1.size)) || |
280 | (file2.ptr && buffer_is_binary(file2.ptr, file2.size))) { | 281 | (file2.ptr && buffer_is_binary(file2.ptr, file2.size))) { |
281 | *binary = 1; | 282 | *binary = 1; |
283 | if (file1.size) | ||
284 | free(file1.ptr); | ||
285 | if (file2.size) | ||
286 | free(file2.ptr); | ||
282 | return 0; | 287 | return 0; |
283 | } | 288 | } |
284 | 289 | ||
@@ -291,6 +296,10 @@ int cgit_diff_files(const unsigned char *old_sha1, | |||
291 | emit_cb.outf = filediff_cb; | 296 | emit_cb.outf = filediff_cb; |
292 | emit_cb.priv = fn; | 297 | emit_cb.priv = fn; |
293 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); | 298 | xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb); |
299 | if (file1.size) | ||
300 | free(file1.ptr); | ||
301 | if (file2.size) | ||
302 | free(file2.ptr); | ||
294 | return 0; | 303 | return 0; |
295 | } | 304 | } |
296 | 305 | ||