mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-14 17:56:11 -04:00
read_dirs: always initialize l->next to NULL
Resolve a segfault when using multiple lower layers. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
1ed274ba57
commit
21cb0e199d
6
main.c
6
main.c
@ -998,11 +998,9 @@ read_dirs (char *path, bool low, struct ovl_layer *layers)
|
|||||||
l->low = low;
|
l->low = low;
|
||||||
if (low)
|
if (low)
|
||||||
{
|
{
|
||||||
|
l->next = NULL;
|
||||||
if (last == NULL)
|
if (last == NULL)
|
||||||
{
|
last = layers = l;
|
||||||
last = layers = l;
|
|
||||||
l->next = NULL;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
last->next = l;
|
last->next = l;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user