qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] mv from strdup to qemu_strdup in qemu-option.c


From: Jean-Christophe DUBOIS
Subject: [Qemu-devel] [PATCH] mv from strdup to qemu_strdup in qemu-option.c
Date: Thu, 3 Sep 2009 00:37:00 +0200

one place is using strdup() instead of qemu_strdup

Fix it

Signed-off-by: Jean-Christophe Dubois <address@hidden>
---
 qemu-option.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qemu-option.c b/qemu-option.c
index 61141e0..0473605 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -274,7 +274,7 @@ int set_option_parameter(QEMUOptionParameter *list, const 
char *name,
 
     case OPT_STRING:
         if (value != NULL) {
-            list->value.s = strdup(value);
+            list->value.s = qemu_strdup(value);
         } else {
             fprintf(stderr, "Option '%s' needs a parameter\n", name);
             return -1;
@@ -334,12 +334,12 @@ void free_option_parameters(QEMUOptionParameter *list)
 
     while (cur && cur->name) {
         if (cur->type == OPT_STRING) {
-            free(cur->value.s);
+            qemu_free(cur->value.s);
         }
         cur++;
     }
 
-    free(list);
+    qemu_free(list);
 }
 
 /*
-- 
1.6.0.4





reply via email to

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