mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 11:50:10 +01:00
Move safe table params wipe into function which allocates it.
This commit is contained in:
@@ -642,8 +642,6 @@ out_no_removal:
|
|||||||
if (cookie && _dm_use_udev())
|
if (cookie && _dm_use_udev())
|
||||||
(void)_dm_udev_wait(cookie);
|
(void)_dm_udev_wait(cookie);
|
||||||
|
|
||||||
if (params)
|
|
||||||
crypt_safe_free(params);
|
|
||||||
if (dmt)
|
if (dmt)
|
||||||
dm_task_destroy(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,
|
r = _dm_create_device(name, type, dmd->data_device,
|
||||||
dmd->flags, dmd->uuid, dmd->size,
|
dmd->flags, dmd->uuid, dmd->size,
|
||||||
table_params, reload);
|
table_params, reload);
|
||||||
|
|
||||||
|
crypt_safe_free(table_params);
|
||||||
dm_exit_context();
|
dm_exit_context();
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user