Fix CID 1211149

This commit is contained in:
jvoisin 2014-05-05 17:44:08 +02:00
parent bdb2a4b568
commit 3fbd1645d7

View File

@ -47,8 +47,12 @@ static int r_io_def_mmap_refresh_def_mmap_buf(RIOMMapFileObj *mmo) {
}
RIOMMapFileObj *r_io_def_mmap_create_new_file(RIO *io, const char *filename, int mode, int flags) {
RIOMMapFileObj *mmo = R_NEW0 (RIOMMapFileObj);
if (!mmo || !io)
RIOMMapFileObj *mmo = NULL;
if (!io)
return NULL;
mmo = R_NEW0 (RIOMMapFileObj);
if (!mmo)
return NULL;
mmo->filename = strdup (filename);