Commit 2250d5f7 authored by Milan Broz's avatar Milan Broz

Move safe table params wipe into function which allocates it.

parent d9678325
......@@ -642,8 +642,6 @@ out_no_removal:
if (cookie && _dm_use_udev())
(void)_dm_udev_wait(cookie);
if (params)
crypt_safe_free(params);
if (dmt)
dm_task_destroy(dmt);
......@@ -674,6 +672,8 @@ int dm_create_device(struct crypt_device *cd, const char *name,
r = _dm_create_device(name, type, dmd->data_device,
dmd->flags, dmd->uuid, dmd->size,
table_params, reload);
crypt_safe_free(table_params);
dm_exit_context();
return r;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment