From: Eric Biggers Date: Fri, 26 Oct 2012 19:45:30 +0000 (-0500) Subject: Return WIMLIB_ERR_NOMEM if security data cannot be allocated X-Git-Tag: v1.0.4~36 X-Git-Url: https://wimlib.net/git/?a=commitdiff_plain;h=f578782128008ae92df890839934bfb528d970df;p=wimlib Return WIMLIB_ERR_NOMEM if security data cannot be allocated --- diff --git a/src/modify.c b/src/modify.c index a8ac048f..5ff3bb3e 100644 --- a/src/modify.c +++ b/src/modify.c @@ -959,8 +959,10 @@ int do_add_image(WIMStruct *w, const char *dir, const char *name, DEBUG("Allocating security data"); sd = CALLOC(1, sizeof(struct wim_security_data)); - if (!sd) + if (!sd) { + ret = WIMLIB_ERR_NOMEM; goto out_destroy_config; + } sd->total_length = 8; sd->refcnt = 1;