mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 09:41:04 +00:00
Filter: Make sure to release local on error
This commit is contained in:
parent
8443ed6c1d
commit
424222f415
@ -617,7 +617,7 @@ int git_filter_list_apply_to_data(
|
||||
si = di; /* swap buffers */
|
||||
} else {
|
||||
tgt->size = 0;
|
||||
return error;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
@ -625,9 +625,10 @@ int git_filter_list_apply_to_data(
|
||||
if (si != 1)
|
||||
git_buf_swap(dbuffer[0], dbuffer[1]);
|
||||
|
||||
cleanup:
|
||||
git_buf_free(&local); /* don't leak if we allocated locally */
|
||||
|
||||
return 0;
|
||||
return error;
|
||||
}
|
||||
|
||||
int git_filter_list_apply_to_file(
|
||||
|
Loading…
Reference in New Issue
Block a user