qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 73ffc80] mv strdup to qemu_strdup in vl.c


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 73ffc80] mv strdup to qemu_strdup in vl.c
Date: Wed, 09 Sep 2009 22:37:00 -0000

From: Jean-Christophe DUBOIS <address@hidden>

There are few places in vl.c not using the qemu version of
malloc/free/strdup.

Fix it.

Signed-off-by: Jean-Christophe Dubois <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/vl.c b/vl.c
index 4205fea..12b19bc 100644
--- a/vl.c
+++ b/vl.c
@@ -858,7 +858,7 @@ static void configure_alarms(char const *opt)
         exit(0);
     }
 
-    arg = strdup(opt);
+    arg = qemu_strdup(opt);
 
     /* Reorder the array */
     name = strtok(arg, ",");
@@ -887,7 +887,7 @@ next:
         name = strtok(NULL, ",");
     }
 
-    free(arg);
+    qemu_free(arg);
 
     if (cur) {
         /* Disable remaining timers */
@@ -4686,7 +4686,7 @@ char *qemu_find_file(int type, const char *name)
     /* If name contains path separators then try it as a straight path.  */
     if ((strchr(name, '/') || strchr(name, '\\'))
         && access(name, R_OK) == 0) {
-        return strdup(name);
+        return qemu_strdup(name);
     }
     switch (type) {
     case QEMU_FILE_TYPE_BIOS:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]