path: free GLib error in fs_charset_to_utf8()
g_error_free() was missing in case g_convert() failed.
This commit is contained in:
parent
8f9d9cc042
commit
71fe7ad81a
@ -45,9 +45,11 @@ char *fs_charset_to_utf8(char *dst, const char *str)
|
|||||||
p = g_convert(str, -1,
|
p = g_convert(str, -1,
|
||||||
fsCharset, "utf-8",
|
fsCharset, "utf-8",
|
||||||
NULL, NULL, &error);
|
NULL, NULL, &error);
|
||||||
if (p == NULL)
|
if (p == NULL) {
|
||||||
/* no fallback */
|
/* no fallback */
|
||||||
|
g_error_free(error);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_strlcpy(dst, p, MPD_PATH_MAX);
|
g_strlcpy(dst, p, MPD_PATH_MAX);
|
||||||
g_free(p);
|
g_free(p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user