gtestutils: Fix a minor memory leak

Coverity CID: #1430603
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2020-08-18 09:33:06 +01:00
parent fb6da5677b
commit b639687b60

View File

@ -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);