commit: Fix crash if dfd_iter is NULL
in write_directory_content_to_mtree_internal dfd_iter can be NULL, for instance if commiting from --tree=ref=FOO. Don't blindly de-ref it to avoid crashing. Closes: #256 Approved by: cgwalters
This commit is contained in:
parent
6a57d0a2f0
commit
77ea287cd2
|
|
@ -2525,7 +2525,7 @@ write_directory_content_to_mtree_internal (OstreeRepo *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_modified_xattrs (self, modifier,
|
if (!get_modified_xattrs (self, modifier,
|
||||||
child_relpath, child_info, child, dfd_iter->fd, name,
|
child_relpath, child_info, child, dfd_iter != NULL ? dfd_iter->fd : -1, name,
|
||||||
&xattrs,
|
&xattrs,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue