mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-16 02:39:29 -04:00
fuse-overlayfs: fix some warnings reported by clang
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
f6cbfc6489
commit
1d7b99d95a
14
main.c
14
main.c
@ -1067,12 +1067,19 @@ make_whiteout_node (const char *path, const char *name)
|
|||||||
|
|
||||||
new_name = strdup (name);
|
new_name = strdup (name);
|
||||||
if (new_name == NULL)
|
if (new_name == NULL)
|
||||||
|
{
|
||||||
|
free (ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
node_set_name (ret, new_name);
|
node_set_name (ret, new_name);
|
||||||
|
|
||||||
ret->path = strdup (path);
|
ret->path = strdup (path);
|
||||||
if (ret->path == NULL)
|
if (ret->path == NULL)
|
||||||
return NULL;
|
{
|
||||||
|
free (new_name);
|
||||||
|
free (ret);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ret->whiteout = 1;
|
ret->whiteout = 1;
|
||||||
ret->ino = &dummy_ino;
|
ret->ino = &dummy_ino;
|
||||||
@ -4588,6 +4595,11 @@ do_fsync (fuse_req_t req, fuse_ino_t ino, int datasync, int fd)
|
|||||||
l = enter_big_lock ();
|
l = enter_big_lock ();
|
||||||
|
|
||||||
node = do_lookup_file (lo, ino, NULL);
|
node = do_lookup_file (lo, ino, NULL);
|
||||||
|
if (node == NULL)
|
||||||
|
{
|
||||||
|
fuse_reply_err (req, ENOENT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Skip fsync for lower layers. */
|
/* Skip fsync for lower layers. */
|
||||||
do_fsync = node && node->layer == get_upper_layer (lo);
|
do_fsync = node && node->layer == get_upper_layer (lo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user