diff options
author | Max Kellermann <max@duempel.org> | 2009-12-15 09:00:18 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-15 09:00:18 +0100 |
commit | 357037f7abc4263a325f39143771ee309845d044 (patch) | |
tree | 7b1c0824a72577e769b9ae77af65238082a61c88 /src/archive/bz2_plugin.c | |
parent | 9715218d4035373af9fd7d181bad923372f02d18 (diff) | |
download | mpd-357037f7abc4263a325f39143771ee309845d044.tar.gz mpd-357037f7abc4263a325f39143771ee309845d044.tar.xz mpd-357037f7abc4263a325f39143771ee309845d044.zip |
archive/bz2: g_malloc() cannot fail
Diffstat (limited to 'src/archive/bz2_plugin.c')
-rw-r--r-- | src/archive/bz2_plugin.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/archive/bz2_plugin.c b/src/archive/bz2_plugin.c index e484ac8a6..67b479e64 100644 --- a/src/archive/bz2_plugin.c +++ b/src/archive/bz2_plugin.c @@ -91,10 +91,8 @@ bz2_open(char * pathname) char *name; int len; - context = g_malloc(sizeof(bz2_context)); - if (!context) { - return NULL; - } + context = g_malloc(sizeof(*context)); + //open archive if (!input_stream_open(&context->istream, pathname)) { g_warning("failed to open an bzip2 archive %s\n",pathname); |