util/Alloc: new library replacing GLib's g_malloc()

This commit is contained in:
Max Kellermann
2014-01-07 23:33:46 +01:00
parent 49f34fbf68
commit 27ca0db7a6
20 changed files with 209 additions and 57 deletions

View File

@@ -19,13 +19,12 @@
#include "config.h"
#include "CueParser.hxx"
#include "util/Alloc.hxx"
#include "util/StringUtil.hxx"
#include "util/CharUtil.hxx"
#include "Song.hxx"
#include "tag/Tag.hxx"
#include <glib.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
@@ -290,9 +289,9 @@ CueParser::Feed(const char *line)
assert(!end);
assert(line != nullptr);
char *allocated = g_strdup(line);
char *allocated = xstrdup(line);
Feed2(allocated);
g_free(allocated);
free(allocated);
}
void