Commit 83cdd0a0 authored by Max Kellermann's avatar Max Kellermann

TagId3: use free() instead of g_free() for libid3tag allocations

parent 53c69cd2
...@@ -107,10 +107,10 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4) ...@@ -107,10 +107,10 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
FormatWarning(id3_domain, FormatWarning(id3_domain,
"Unable to convert %s string to UTF-8: '%s'", "Unable to convert %s string to UTF-8: '%s'",
encoding, isostr); encoding, isostr);
g_free(isostr); free(isostr);
return nullptr; return nullptr;
} }
g_free(isostr); free(isostr);
} else { } else {
utf8 = id3_ucs4_utf8duplicate(ucs4); utf8 = id3_ucs4_utf8duplicate(ucs4);
if (gcc_unlikely(utf8 == nullptr)) if (gcc_unlikely(utf8 == nullptr))
...@@ -118,7 +118,7 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4) ...@@ -118,7 +118,7 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
} }
utf8_stripped = (id3_utf8_t *)g_strdup(g_strstrip((gchar *)utf8)); utf8_stripped = (id3_utf8_t *)g_strdup(g_strstrip((gchar *)utf8));
g_free(utf8); free(utf8);
return utf8_stripped; return utf8_stripped;
} }
......
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