From patchwork Wed Sep 2 21:59:06 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: 32854 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 45214B7093 for ; Thu, 3 Sep 2009 08:02:38 +1000 (EST) Received: from localhost ([127.0.0.1]:54972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MixuV-0002hw-Lk for incoming@patchwork.ozlabs.org; Wed, 02 Sep 2009 18:02:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MixrM-0001yc-2d for qemu-devel@nongnu.org; Wed, 02 Sep 2009 17:59:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MixrG-0001wH-Hx for qemu-devel@nongnu.org; Wed, 02 Sep 2009 17:59:18 -0400 Received: from [199.232.76.173] (port=60909 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MixrG-0001wE-EZ for qemu-devel@nongnu.org; Wed, 02 Sep 2009 17:59:14 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:35185) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MixrF-0007TB-NS for qemu-devel@nongnu.org; Wed, 02 Sep 2009 17:59:14 -0400 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 0B51AE0806A; Wed, 2 Sep 2009 23:59:09 +0200 (CEST) Received: from localhost.localdomain (unknown [78.235.240.156]) by smtp6-g21.free.fr (Postfix) with ESMTP id 0BD5EE080DF; Wed, 2 Sep 2009 23:59:07 +0200 (CEST) From: Jean-Christophe DUBOIS To: qemu-devel@nongnu.org Date: Wed, 2 Sep 2009 23:59:06 +0200 Message-Id: <1251928746-429-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 strdup to qemu_strdup in vl.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 There are few places in vl.c not using the qemu version of malloc/free/strdup. Fix it. Signed-off-by: Jean-Christophe Dubois --- vl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 4188178..566254e 100644 --- a/vl.c +++ b/vl.c @@ -854,7 +854,7 @@ static void configure_alarms(char const *opt) exit(0); } - arg = strdup(opt); + arg = qemu_strdup(opt); /* Reorder the array */ name = strtok(arg, ","); @@ -883,7 +883,7 @@ next: name = strtok(NULL, ","); } - free(arg); + qemu_free(arg); if (cur) { /* Disable remaining timers */ @@ -4764,7 +4764,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: