mirror of
git://github.com/lxc/lxc
synced 2025-08-31 06:45:14 +00:00
confile: don't leak memory in case multiple shmounts are set
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32503 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -2280,7 +2280,10 @@ static int set_config_mount_auto(const char *key, const char *value,
|
||||
if(!container_path)
|
||||
return log_error_errno(-EINVAL, EINVAL, "Failed to copy shmounts container path");
|
||||
|
||||
free_disarm(lxc_conf->shmount.path_host);
|
||||
lxc_conf->shmount.path_host = move_ptr(host_path);
|
||||
|
||||
free_disarm(lxc_conf->shmount.path_cont);
|
||||
lxc_conf->shmount.path_cont = move_ptr(container_path);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user