From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mv84J-0006sp-7e for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:18:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mv84D-0006pV-Ld for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:18:58 -0400 Received: from [199.232.76.173] (port=40397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mv84D-0006pI-3C for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:18:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1948) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mv84C-0007rz-LE for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:18:52 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n96BIpIa020633 for ; Tue, 6 Oct 2009 07:18:51 -0400 From: Mark McLoughlin Date: Tue, 6 Oct 2009 12:16:51 +0100 Message-Id: <1254827836-11021-2-git-send-email-markmc@redhat.com> In-Reply-To: <1254827783.2720.42.camel@blaa> References: <1254827783.2720.42.camel@blaa> Subject: [Qemu-devel] [PATCH] Use qemu_strdup() for NICInfo string fields List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin Signed-off-by: Mark McLoughlin --- net.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net.c b/net.c index dc274c7..f2b954c 100644 --- a/net.c +++ b/net.c @@ -2380,7 +2380,7 @@ int qemu_find_nic_model(NICInfo *nd, const char * const *models, int i; if (!nd->model) - nd->model = strdup(default_model); + nd->model = qemu_strdup(default_model); for (i = 0 ; models[i]; i++) { if (strcmp(nd->model, models[i]) == 0) @@ -2459,13 +2459,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)) { -- 1.6.2.5