]> wimlib.net Git - wimlib/blobdiff - src/modify.c
Return WIMLIB_ERR_NOMEM if security data cannot be allocated
[wimlib] / 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;