From 8908ce4c8e6ef4d7620863aedb06b9500e02707d Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 25 Apr 2015 10:44:53 -0500 Subject: [PATCH] wimlib_create_new_wim(): check for NULL wim_ret --- src/wim.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wim.c b/src/wim.c index a66d5cce..9b776023 100644 --- 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 (!wim_ret) + return WIMLIB_ERR_INVALID_PARAM; + wim = new_wim_struct(); if (!wim) return WIMLIB_ERR_NOMEM; -- 2.43.0