mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 21:39:25 +00:00
commit
ff80b5e80b
@ -823,7 +823,8 @@ int git_patch__invoke_callbacks(
|
|||||||
for (i = 0; !error && i < git_array_size(patch->hunks); ++i) {
|
for (i = 0; !error && i < git_array_size(patch->hunks); ++i) {
|
||||||
diff_patch_hunk *h = git_array_get(patch->hunks, i);
|
diff_patch_hunk *h = git_array_get(patch->hunks, i);
|
||||||
|
|
||||||
error = hunk_cb(patch->delta, &h->hunk, payload);
|
if (hunk_cb)
|
||||||
|
error = hunk_cb(patch->delta, &h->hunk, payload);
|
||||||
|
|
||||||
if (!line_cb)
|
if (!line_cb)
|
||||||
continue;
|
continue;
|
||||||
|
@ -292,6 +292,9 @@ static void index_entry_reuc_free(git_index_reuc_entry *reuc)
|
|||||||
|
|
||||||
static void index_entry_free(git_index_entry *entry)
|
static void index_entry_free(git_index_entry *entry)
|
||||||
{
|
{
|
||||||
|
if (!entry)
|
||||||
|
return;
|
||||||
|
|
||||||
memset(&entry->id, 0, sizeof(entry->id));
|
memset(&entry->id, 0, sizeof(entry->id));
|
||||||
git__free(entry);
|
git__free(entry);
|
||||||
}
|
}
|
||||||
|
@ -318,6 +318,9 @@ static git_pathspec_match_list *pathspec_match_alloc(
|
|||||||
m = NULL;
|
m = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* need to keep reference to pathspec and increment refcount because
|
/* need to keep reference to pathspec and increment refcount because
|
||||||
* failures array stores pointers to the pattern strings of the
|
* failures array stores pointers to the pattern strings of the
|
||||||
* pathspec that had no matches
|
* pathspec that had no matches
|
||||||
|
Loading…
Reference in New Issue
Block a user