qemu-log: Fix unchecked strdup() by converting to g_strdup()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Markus Armbruster 2013-01-22 11:08:02 +01:00 committed by Stefan Hajnoczi
parent 606017de2f
commit 636e0f27c6
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ void qemu_set_log(int log_flags, bool use_own_buffers)
void cpu_set_log_filename(const char *filename)
{
logfilename = strdup(filename);
logfilename = g_strdup(filename);
if (qemu_logfile) {
fclose(qemu_logfile);
qemu_logfile = NULL;