import: fix NULL pointer dereference

Follow-up for a9f6ba0496.
Fixes CID#1645106.
This commit is contained in:
Yu Watanabe
2026-02-20 16:12:36 +09:00
parent be9dd0da40
commit 298fc56641
+4 -1
View File
@@ -101,7 +101,10 @@ static OciLayerState* oci_layer_state_free(OciLayerState *st) {
pidref_done_sigkill_wait(&st->tar_pid);
if (st->temp_path) {
import_remove_tree(st->temp_path, st->pull ? &st->pull->userns_fd : NULL, st->pull->flags);
import_remove_tree(
st->temp_path,
st->pull ? &st->pull->userns_fd : NULL,
st->pull ? st->pull->flags : 0);
free(st->temp_path);
}
free(st->final_path);