From f578782128008ae92df890839934bfb528d970df Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 26 Oct 2012 14:45:30 -0500 Subject: [PATCH] Return WIMLIB_ERR_NOMEM if security data cannot be allocated --- src/modify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.43.0