mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
daemon: fix memory leak in daemonUnixSocketPaths
@rundir, allocated by virGetUserRuntimeDirectory, is leaked in case virFileMakePath fails. Signed-off-by: Xi Xu <xu.xi8@zte.com.cn> Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
5c8c2d1633
commit
2502a0fade
@ -288,6 +288,7 @@ daemonUnixSocketPaths(struct daemonConfig *config,
|
||||
old_umask = umask(077);
|
||||
if (virFileMakePath(rundir) < 0) {
|
||||
umask(old_umask);
|
||||
VIR_FREE(rundir);
|
||||
goto error;
|
||||
}
|
||||
umask(old_umask);
|
||||
|
Loading…
Reference in New Issue
Block a user