diff options
author | Robert Foley <robert.foley@linaro.org> | 2019-11-18 16:15:23 -0500 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2019-12-18 20:18:02 +0000 |
commit | 0f516ca4767042aec8716369d6d62436fa10593a (patch) | |
tree | d9e1825157b43429b55c849092fe273ea997a0d9 /util | |
parent | bc4486fb233573e77b6e9ad6d6379afb5e37ad8c (diff) | |
download | qemu-0f516ca4767042aec8716369d6d62436fa10593a.zip qemu-0f516ca4767042aec8716369d6d62436fa10593a.tar.gz qemu-0f516ca4767042aec8716369d6d62436fa10593a.tar.bz2 |
Fix double free issue in qemu_set_log_filename().
After freeing the logfilename, we set logfilename to NULL, in case of an
error which returns without setting logfilename.
Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20191118211528.3221-2-robert.foley@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/log.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -113,6 +113,7 @@ void qemu_set_log_filename(const char *filename, Error **errp) { char *pidstr; g_free(logfilename); + logfilename = NULL; pidstr = strstr(filename, "%"); if (pidstr) { |