diff options
author | Max Reitz <mreitz@redhat.com> | 2017-04-13 18:09:52 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-04-24 09:12:59 +0200 |
commit | 536eeea86905237953a7c05c2fa2a3d1f3cba328 (patch) | |
tree | 6a5794e01f7864857a602786f56f5a9f36a093b1 /util | |
parent | 32c7e0ab755745e961f1772e95cac381cc68769d (diff) |
util/error: Fix leak in error_vprepend()
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20170413160952.29918-1-mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/error.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |