diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-30 14:17:57 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-30 14:17:57 -0300 |
commit | cff52c5423f9beabbbb857e16f1e36bba4efad8d (patch) | |
tree | a6373fa56f71b7d21bdb20910133bcd25df5b788 /git.c | |
parent | 2f74f1bd701788c3fe8bcb1d96ff8c5da1456986 (diff) |
git: Make sure `f->name` is NULL before freeing `f` in
`parse_{comments,info}_file_path`
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -272,6 +272,7 @@ static int parse_info_file(pull_request *pr, char *buf, const char *root) { static int parse_comments_file_path(comment ***comments, const char *root) { file *f = create_file(root, "comments"); int ret = parse_comments_file(comments, f->buf); + f->name = NULL; free_file(f); return ret; } @@ -279,6 +280,7 @@ static int parse_comments_file_path(comment ***comments, const char *root) { static int parse_info_file_path(pull_request *pr, const char *root) { file *f = create_file(root, "info"); int ret = parse_info_file(pr, f->buf, root); + f->name = NULL; free_file(f); return ret; } |