mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-15 10:21:19 -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);
|
||||
if (new_name == NULL)
|
||||
{
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
node_set_name (ret, new_name);
|
||||
|
||||
ret->path = strdup (path);
|
||||
if (ret->path == NULL)
|
||||
return NULL;
|
||||
{
|
||||
free (new_name);
|
||||
free (ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret->whiteout = 1;
|
||||
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 ();
|
||||
|
||||
node = do_lookup_file (lo, ino, NULL);
|
||||
if (node == NULL)
|
||||
{
|
||||
fuse_reply_err (req, ENOENT);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Skip fsync for lower layers. */
|
||||
do_fsync = node && node->layer == get_upper_layer (lo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user