mirror of
git://github.com/lxc/lxc
synced 2025-09-05 13:09:35 +00:00
coverity: #1426028
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -725,15 +725,9 @@ char *ovl_get_rootfs(const char *rootfs_path, size_t *rootfslen)
|
||||
*s3 = '\0';
|
||||
|
||||
rootfsdir = strdup(s2);
|
||||
if (!rootfsdir) {
|
||||
free(s1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
free(s1);
|
||||
if (!rootfsdir)
|
||||
rootfsdir = s1;
|
||||
else
|
||||
free(s1);
|
||||
return NULL;
|
||||
|
||||
*rootfslen = strlen(rootfsdir);
|
||||
|
||||
|
Reference in New Issue
Block a user