Merge branch 'minor-coverity-fixes' into 'master'

Minor Coverity fixes

See merge request GNOME/glib!1619
This commit is contained in:
Sebastian Dröge 2020-08-18 09:07:39 +00:00
commit 27d857bfa1
2 changed files with 5 additions and 1 deletions

View File

@ -1530,7 +1530,10 @@ void
test_prgname = g_path_get_basename (g_get_prgname ());
if (*test_prgname == '\0')
{
g_free (test_prgname);
test_prgname = g_strdup ("unknown");
}
tmpl = g_strdup_printf ("test_%s_XXXXXX", test_prgname);
g_free (test_prgname);

View File

@ -350,6 +350,7 @@ uri_decoder (gchar **out,
*d = '\0';
len = d - decoded;
g_assert (len >= 0);
if (!(flags & G_URI_FLAGS_ENCODED) &&
!g_utf8_validate (decoded, len, &invalid))