From patchwork Wed Sep 2 22:37:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 32858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id E1FFDB70B0 for ; Thu, 3 Sep 2009 08:37:46 +1000 (EST) Received: from localhost ([127.0.0.1]:45011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiySU-0005yH-5C for incoming@patchwork.ozlabs.org; Wed, 02 Sep 2009 18:37:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiyS1-0005y9-S8 for qemu-devel@nongnu.org; Wed, 02 Sep 2009 18:37:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiyRw-0005xF-LQ for qemu-devel@nongnu.org; Wed, 02 Sep 2009 18:37:12 -0400 Received: from [199.232.76.173] (port=54609 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiyRw-0005wz-Ic for qemu-devel@nongnu.org; Wed, 02 Sep 2009 18:37:08 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:54417) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiyRv-0004vo-M9 for qemu-devel@nongnu.org; Wed, 02 Sep 2009 18:37:08 -0400 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 10EDCE080AC; Thu, 3 Sep 2009 00:37:03 +0200 (CEST) Received: from localhost.localdomain (unknown [78.235.240.156]) by smtp6-g21.free.fr (Postfix) with ESMTP id 10EEDE08056; Thu, 3 Sep 2009 00:37:01 +0200 (CEST) From: Jean-Christophe DUBOIS To: qemu-devel@nongnu.org Date: Thu, 3 Sep 2009 00:37:00 +0200 Message-Id: <1251931020-11310-1-git-send-email-jcd@tribudubois.net> X-Mailer: git-send-email 1.6.0.4 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Jean-Christophe DUBOIS Subject: [Qemu-devel] [PATCH] mv from strdup to qemu_strdup in qemu-option.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org one place is using strdup() instead of qemu_strdup Fix it Signed-off-by: Jean-Christophe Dubois --- 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); } /*