Commit 71fe7ad8 authored by Max Kellermann's avatar Max Kellermann

path: free GLib error in fs_charset_to_utf8()

g_error_free() was missing in case g_convert() failed.
parent 8f9d9cc0
......@@ -45,9 +45,11 @@ char *fs_charset_to_utf8(char *dst, const char *str)
p = g_convert(str, -1,
fsCharset, "utf-8",
NULL, NULL, &error);
if (p == NULL)
if (p == NULL) {
/* no fallback */
g_error_free(error);
return NULL;
}
g_strlcpy(dst, p, MPD_PATH_MAX);
g_free(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment