aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/path.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index 5b84d3506..01f18ed1b 100644
--- a/src/path.c
+++ b/src/path.c
@@ -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);