Skip to content
Snippets Groups Projects
Commit d1eddab8 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Markus Armbruster
Browse files

qga: Fix a memory leak


The string returned by g_win32_error_message() has to be
deallocated with g_free().

Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200228100726.8414-5-philmd@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent 672db778
No related branches found
No related tags found
No related merge requests found
......@@ -302,8 +302,8 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL);
if (c->handle == INVALID_HANDLE_VALUE) {
g_critical("error opening path %s: %s", newpath,
g_win32_error_message(GetLastError()));
g_autofree gchar *emsg = g_win32_error_message(GetLastError());
g_critical("error opening path %s: %s", newpath, emsg);
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment