From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyhJn-0008T1-VC for qemu-devel@nongnu.org; Thu, 13 Apr 2017 12:10:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyhJl-0005A0-8Q for qemu-devel@nongnu.org; Thu, 13 Apr 2017 12:09:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45070) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cyhJl-00059c-21 for qemu-devel@nongnu.org; Thu, 13 Apr 2017 12:09:57 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 253883D8 for ; Thu, 13 Apr 2017 16:09:56 +0000 (UTC) From: Max Reitz Date: Thu, 13 Apr 2017 18:09:52 +0200 Message-Id: <20170413160952.29918-1-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH] util/error: Fix leak in error_vprepend() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Max Reitz , Markus Armbruster Signed-off-by: Max Reitz --- util/error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/error.c b/util/error.c index 9c40b1f458..020b86b9f0 100644 --- a/util/error.c +++ b/util/error.c @@ -134,6 +134,7 @@ void error_vprepend(Error **errp, const char *fmt, va_list ap) newmsg = g_string_new(NULL); g_string_vprintf(newmsg, fmt, ap); g_string_append(newmsg, (*errp)->msg); + g_free((*errp)->msg); (*errp)->msg = g_string_free(newmsg, 0); } -- 2.12.2