[glib: 6/12] glib/win32: fix potential leak on spawn error
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/12] glib/win32: fix potential leak on spawn error
- Date: Fri, 13 May 2022 10:25:28 +0000 (UTC)
commit 982b074fa97bcabc5e7624ac883b035a403f401e
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Thu Apr 7 17:49:36 2022 +0400
glib/win32: fix potential leak on spawn error
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
glib/gspawn-win32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c
index fc2a96c949..29bdf4d79b 100644
--- a/glib/gspawn-win32.c
+++ b/glib/gspawn-win32.c
@@ -903,7 +903,8 @@ fork_exec (gint *exit_status,
0, TRUE, DUPLICATE_SAME_ACCESS))
{
char *emsg = g_win32_error_message (GetLastError ());
- g_print("%s\n", emsg);
+ g_print ("%s\n", emsg);
+ g_free (emsg);
*child_pid = 0;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]