From patchwork Wed Jan 30 10:24:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 216887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 784962C0087 for ; Wed, 30 Jan 2013 23:19:42 +1100 (EST) Received: from localhost ([::1]:55378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Wdg-0001LH-Lh for incoming@patchwork.ozlabs.org; Wed, 30 Jan 2013 07:19:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Ur2-0002XE-I5 for qemu-devel@nongnu.org; Wed, 30 Jan 2013 05:25:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0Uqy-0003of-EF for qemu-devel@nongnu.org; Wed, 30 Jan 2013 05:25:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Uqy-0003oX-7b for qemu-devel@nongnu.org; Wed, 30 Jan 2013 05:25:16 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0UAPFGP026299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Jan 2013 05:25:15 -0500 Received: from localhost (ovpn-112-21.ams2.redhat.com [10.36.112.21]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0UAPE4a007506; Wed, 30 Jan 2013 05:25:14 -0500 From: Stefan Hajnoczi To: Date: Wed, 30 Jan 2013 11:24:23 +0100 Message-Id: <1359541470-30775-16-git-send-email-stefanha@redhat.com> In-Reply-To: <1359541470-30775-1-git-send-email-stefanha@redhat.com> References: <1359541470-30775-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Markus Armbruster , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 11/18] qemu-log: Fix unchecked strdup() by converting to g_strdup() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- qemu-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-log.c b/qemu-log.c index b655b30..64a1b88 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -84,7 +84,7 @@ void qemu_set_log(int log_flags, bool use_own_buffers) void cpu_set_log_filename(const char *filename) { - logfilename = strdup(filename); + logfilename = g_strdup(filename); if (qemu_logfile) { fclose(qemu_logfile); qemu_logfile = NULL;