]> wimlib.net Git - wimlib/commitdiff
Return WIMLIB_ERR_NOMEM if security data cannot be allocated
authorEric Biggers <ebiggers3@gmail.com>
Fri, 26 Oct 2012 19:45:30 +0000 (14:45 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 26 Oct 2012 19:45:30 +0000 (14:45 -0500)
src/modify.c

index a8ac048ff8d68f280f3da79624782a415137fa4d..5ff3bb3e1fde7dec7d421dd96e3e98da68131f80 100644 (file)
@@ -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;