]> wimlib.net Git - wimlib/commitdiff
wimlib_create_new_wim(): check for NULL wim_ret
authorEric Biggers <ebiggers3@gmail.com>
Sat, 25 Apr 2015 15:44:53 +0000 (10:44 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 25 Apr 2015 17:39:08 +0000 (12:39 -0500)
src/wim.c

index a66d5cce1c16462670515398af70de3fd4993df3..9b776023dd326d16f6f617bb3dcd61430a4d97b2 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -202,6 +202,9 @@ wimlib_create_new_wim(int ctype, WIMStruct **wim_ret)
        if (ret)
                return ret;
 
        if (ret)
                return ret;
 
+       if (!wim_ret)
+               return WIMLIB_ERR_INVALID_PARAM;
+
        wim = new_wim_struct();
        if (!wim)
                return WIMLIB_ERR_NOMEM;
        wim = new_wim_struct();
        if (!wim)
                return WIMLIB_ERR_NOMEM;