fix a segfault in sandbox.c if handle->dlcb is null
(cherry picked from commit a2d029388c
)
This commit is contained in:
parent
e3aedfb7aa
commit
c685ae6412
1 changed files with 3 additions and 1 deletions
|
@ -222,7 +222,9 @@ bool _alpm_sandbox_process_cb_download(alpm_handle_t *handle, int callback_pipe)
|
||||||
ASSERT(read_from_pipe(callback_pipe, filename, filename_size) != -1, FREE(filename); return false);
|
ASSERT(read_from_pipe(callback_pipe, filename, filename_size) != -1, FREE(filename); return false);
|
||||||
filename[filename_size] = '\0';
|
filename[filename_size] = '\0';
|
||||||
|
|
||||||
|
if(handle->dlcb) {
|
||||||
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
handle->dlcb(handle->dlcb_ctx, filename, type, &cb_data);
|
||||||
|
}
|
||||||
FREE(filename);
|
FREE(filename);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue