mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
local: plug a leak in the progress reporting
This commit is contained in:
parent
4a6a67461d
commit
542a7de0cd
@ -474,6 +474,7 @@ static int local_counting(int stage, unsigned int current, unsigned int total, v
|
|||||||
{
|
{
|
||||||
git_buf progress_info = GIT_BUF_INIT;
|
git_buf progress_info = GIT_BUF_INIT;
|
||||||
transport_local *t = payload;
|
transport_local *t = payload;
|
||||||
|
int error;
|
||||||
|
|
||||||
if (!t->progress_cb)
|
if (!t->progress_cb)
|
||||||
return 0;
|
return 0;
|
||||||
@ -493,7 +494,10 @@ static int local_counting(int stage, unsigned int current, unsigned int total, v
|
|||||||
if (git_buf_oom(&progress_info))
|
if (git_buf_oom(&progress_info))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return t->progress_cb(git_buf_cstr(&progress_info), git_buf_len(&progress_info), t->message_cb_payload);
|
error = t->progress_cb(git_buf_cstr(&progress_info), git_buf_len(&progress_info), t->message_cb_payload);
|
||||||
|
git_buf_free(&progress_info);
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int local_download_pack(
|
static int local_download_pack(
|
||||||
|
Loading…
Reference in New Issue
Block a user