archive/bz2: g_malloc() cannot fail
This commit is contained in:
parent
9715218d40
commit
357037f7ab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user