From 536eeea86905237953a7c05c2fa2a3d1f3cba328 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Thu, 13 Apr 2017 18:09:52 +0200 Subject: util/error: Fix leak in error_vprepend() Signed-off-by: Max Reitz Message-Id: <20170413160952.29918-1-mreitz@redhat.com> Reviewed-by: Fam Zheng Reviewed-by: Jeff Cody Signed-off-by: Markus Armbruster Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- util/error.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util/error.c') 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); } -- cgit v1.2.3