36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
From b639687b60fb0bd1e2addfa960c3532bf3ebf2a3 Mon Sep 17 00:00:00 2001
|
|
From: Philip Withnall <withnall@endlessm.com>
|
|
Date: Tue, 18 Aug 2020 09:33:06 +0100
|
|
Subject: [PATCH 0861/1095] gtestutils: Fix a minor memory leak
|
|
|
|
Coverity CID: #1430603
|
|
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
reason:gtestutils: Fix a minor memory leak
|
|
|
|
Conflict:NA
|
|
Reference:https://github.com/GNOME/glib/commit/b639687b60fb0bd1e2addfa960c3532bf3ebf2a3
|
|
---
|
|
glib/gtestutils.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
|
|
index 8ca995c..3b03e98 100644
|
|
--- a/glib/gtestutils.c
|
|
+++ b/glib/gtestutils.c
|
|
@@ -1530,7 +1530,10 @@ void
|
|
|
|
test_prgname = g_path_get_basename (g_get_prgname ());
|
|
if (*test_prgname == '\0')
|
|
- test_prgname = g_strdup ("unknown");
|
|
+ {
|
|
+ g_free (test_prgname);
|
|
+ test_prgname = g_strdup ("unknown");
|
|
+ }
|
|
tmpl = g_strdup_printf ("test_%s_XXXXXX", test_prgname);
|
|
g_free (test_prgname);
|
|
|
|
--
|
|
1.8.3.1
|
|
|