aboutsummaryrefslogtreecommitdiffstats
path: root/src/IcyMetaDataParser.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-04 15:03:39 +0100
committerMax Kellermann <max@duempel.org>2013-12-04 15:03:39 +0100
commit1ad2f18c9e656186993203173c8ad72ebe09178a (patch)
tree538810082d5decda6f51ae2a7962e1412e0c5382 /src/IcyMetaDataParser.cxx
parent06a49a5f9eb0338e73a1bf66b080f8ffa38790db (diff)
downloadmpd-1ad2f18c9e656186993203173c8ad72ebe09178a.tar.gz
mpd-1ad2f18c9e656186993203173c8ad72ebe09178a.tar.xz
mpd-1ad2f18c9e656186993203173c8ad72ebe09178a.zip
IcyMetaDataParser: use new[]/delete[] instead of g_malloc()/g_free()
Diffstat (limited to '')
-rw-r--r--src/IcyMetaDataParser.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/IcyMetaDataParser.cxx b/src/IcyMetaDataParser.cxx
index 6beeddd31..5444db8d9 100644
--- a/src/IcyMetaDataParser.cxx
+++ b/src/IcyMetaDataParser.cxx
@@ -38,7 +38,7 @@ IcyMetaDataParser::Reset()
return;
if (data_rest == 0 && meta_size > 0)
- g_free(meta_data);
+ delete[] meta_data;
delete tag;
@@ -138,7 +138,7 @@ IcyMetaDataParser::Meta(const void *data, size_t length)
/* initialize metadata reader, allocate enough
memory (+1 for the null terminator) */
meta_position = 0;
- meta_data = (char *)g_malloc(meta_size + 1);
+ meta_data = new char[meta_size + 1];
}
assert(meta_position < meta_size);
@@ -163,7 +163,7 @@ IcyMetaDataParser::Meta(const void *data, size_t length)
delete tag;
tag = icy_parse_tag(meta_data);
- g_free(meta_data);
+ delete[] meta_data;
/* change back to normal data mode */