diff options
author | Max Kellermann <max@duempel.org> | 2008-10-31 12:20:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-31 12:20:48 +0100 |
commit | 71fe7ad81a686e07b28f92cf0287d61766bc6d67 (patch) | |
tree | d21a1f20762ac669d7b5372d469f849779722ab3 /src | |
parent | 8f9d9cc04233bffa23ab3dc071b4a3f256b31399 (diff) | |
download | mpd-71fe7ad81a686e07b28f92cf0287d61766bc6d67.tar.gz mpd-71fe7ad81a686e07b28f92cf0287d61766bc6d67.tar.xz mpd-71fe7ad81a686e07b28f92cf0287d61766bc6d67.zip |
path: free GLib error in fs_charset_to_utf8()
g_error_free() was missing in case g_convert() failed.
Diffstat (limited to '')
-rw-r--r-- | src/path.c | 4 |
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); |