mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-31 07:00:34 +00:00
diff-index: fix leak
The buffer wasn't getting freed if the last difference was a deletion.
This commit is contained in:
parent
860de00459
commit
9269ccce14
@ -71,7 +71,7 @@ static int gen_request(git_buf *buf, const char *url, const char *host, const ch
|
||||
if (content_length > 0) {
|
||||
git_buf_printf(buf, "Accept: application/x-git-%s-result\r\n", service);
|
||||
git_buf_printf(buf, "Content-Type: application/x-git-%s-request\r\n", service);
|
||||
git_buf_printf(buf, "Content-Length: %" PRIuZ "\r\n", content_length);
|
||||
git_buf_printf(buf, "Content-Length: %"PRIuZ "\r\n", content_length);
|
||||
} else {
|
||||
git_buf_puts(buf, "Accept: */*\r\n");
|
||||
}
|
||||
|
||||
@ -993,6 +993,7 @@ static int diff_index_cb(const char *root, git_tree_entry *tentry, void *data)
|
||||
|
||||
if (!ientry) {
|
||||
error = signal_deletion(tentry, cbdata->cb, cbdata->data);
|
||||
git_buf_free(&fn_buf);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user