mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
main: check for parent->children before accessing it
this should not happen, but better be sure. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
f41a872e0d
commit
12552f315f
2
main.c
2
main.c
@ -944,7 +944,7 @@ node_free (void *p)
|
|||||||
|
|
||||||
if (n->parent)
|
if (n->parent)
|
||||||
{
|
{
|
||||||
if (hash_lookup (n->parent->children, n) == n)
|
if (n->parent->children && hash_lookup (n->parent->children, n) == n)
|
||||||
hash_delete (n->parent->children, n);
|
hash_delete (n->parent->children, n);
|
||||||
n->parent->loaded = 0;
|
n->parent->loaded = 0;
|
||||||
n->parent = NULL;
|
n->parent = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user