gdbus: actually return string length from hexdecode()

https://bugzilla.gnome.org/show_bug.cgi?id=794170
This commit is contained in:
Руслан Ижбулатов
2018-03-08 09:35:15 +00:00
committed by Philip Withnall
parent 8e315bd8ae
commit f7c0ff773e
4 changed files with 28 additions and 11 deletions

View File

@@ -404,13 +404,17 @@ hexdecode (const gchar *str,
g_string_append_c (s, value);
}
*out_len = s->len;
ret = g_string_free (s, FALSE);
s = NULL;
out:
if (s != NULL)
g_string_free (s, TRUE);
return ret;
{
*out_len = 0;
g_string_free (s, TRUE);
}
return ret;
}
/* TODO: take len */