aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-07 23:33:46 +0100
committerMax Kellermann <max@duempel.org>2014-01-07 23:35:18 +0100
commit27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2 (patch)
tree3f200069ab73baa09898fe1f242c6fd85396e2ba /src/input
parent49f34fbf6861f10dbf9eb7549177888394926ff9 (diff)
downloadmpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.gz
mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.xz
mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.zip
util/Alloc: new library replacing GLib's g_malloc()
Diffstat (limited to 'src/input')
-rw-r--r--src/input/ArchiveInputPlugin.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/input/ArchiveInputPlugin.cxx b/src/input/ArchiveInputPlugin.cxx
index 5797caced..597a91604 100644
--- a/src/input/ArchiveInputPlugin.cxx
+++ b/src/input/ArchiveInputPlugin.cxx
@@ -26,9 +26,10 @@
#include "ArchiveFile.hxx"
#include "InputPlugin.hxx"
#include "fs/Traits.hxx"
+#include "util/Alloc.hxx"
#include "Log.hxx"
-#include <glib.h>
+#include <stdlib.h>
/**
* select correct archive plugin to handle the input stream
@@ -49,13 +50,13 @@ input_archive_open(const char *pathname,
if (!PathTraitsFS::IsAbsolute(pathname))
return nullptr;
- char *pname = g_strdup(pathname);
+ char *pname = strdup(pathname);
// archive_lookup will modify pname when true is returned
const char *archive, *filename, *suffix;
if (!archive_lookup(pname, &archive, &filename, &suffix)) {
FormatDebug(archive_domain,
"not an archive, lookup %s failed", pname);
- g_free(pname);
+ free(pname);
return nullptr;
}
@@ -64,19 +65,19 @@ input_archive_open(const char *pathname,
if (!arplug) {
FormatWarning(archive_domain,
"can't handle archive %s", archive);
- g_free(pname);
+ free(pname);
return nullptr;
}
auto file = archive_file_open(arplug, archive, error);
if (file == nullptr) {
- g_free(pname);
+ free(pname);
return nullptr;
}
//setup fileops
is = file->OpenStream(filename, mutex, cond, error);
- g_free(pname);
+ free(pname);
file->Close();
return is;