From patchwork Wed Sep 23 10:24:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 34124 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 ozlabs.org (Postfix) with ESMTPS id E8824B7B78 for ; Wed, 23 Sep 2009 20:28:28 +1000 (EST) Received: from localhost ([127.0.0.1]:60657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqP5E-00047g-CY for incoming@patchwork.ozlabs.org; Wed, 23 Sep 2009 06:28:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqP2m-0003k4-Ek for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqP2f-0003fE-Pl for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:50 -0400 Received: from [199.232.76.173] (port=37803 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqP2f-0003ey-73 for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4453) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqP2e-0001Ue-AD for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:44 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPh4w016142 for ; Wed, 23 Sep 2009 06:25:43 -0400 Received: from blaa.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPgTD019721; Wed, 23 Sep 2009 06:25:42 -0400 Received: by blaa.localdomain (Postfix, from userid 500) id A41B02D85; Wed, 23 Sep 2009 11:24:23 +0100 (IST) From: Mark McLoughlin To: qemu-devel@nongnu.org Date: Wed, 23 Sep 2009 11:24:00 +0100 Message-Id: <1253701463-3134-2-git-send-email-markmc@redhat.com> In-Reply-To: <1253701463-3134-1-git-send-email-markmc@redhat.com> References: <1253701463-3134-1-git-send-email-markmc@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 01/24] Use qemu_strdup() for NICInfo string fields 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 Signed-off-by: Mark McLoughlin --- net.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net.c b/net.c index 3fdf1e6..c276d0a 100644 --- a/net.c +++ b/net.c @@ -2364,7 +2364,7 @@ void qemu_check_nic_model_list(NICInfo *nd, const char * const *models, int i, exit_status = 0; if (!nd->model) - nd->model = strdup(default_model); + nd->model = qemu_strdup(default_model); if (strcmp(nd->model, "?") != 0) { for (i = 0 ; models[i]; i++) @@ -2450,13 +2450,13 @@ int net_client_init(Monitor *mon, const char *device, const char *p) } } if (get_param_value(buf, sizeof(buf), "model", p)) { - nd->model = strdup(buf); + nd->model = qemu_strdup(buf); } if (get_param_value(buf, sizeof(buf), "addr", p)) { - nd->devaddr = strdup(buf); + nd->devaddr = qemu_strdup(buf); } if (get_param_value(buf, sizeof(buf), "id", p)) { - nd->id = strdup(buf); + nd->id = qemu_strdup(buf); } nd->nvectors = NIC_NVECTORS_UNSPECIFIED; if (get_param_value(buf, sizeof(buf), "vectors", p)) { @@ -2804,7 +2804,7 @@ void net_client_uninit(NICInfo *nd) nd->vlan->nb_guest_devs--; nb_nics--; nd->used = 0; - free((void *)nd->model); + qemu_free((void *)nd->model); } static int net_host_check_device(const char *device)