diff options
Diffstat (limited to 'core/cryptsetup/0001-Move-safe-table-params-wipe-into-function-which-allo.patch')
-rw-r--r-- | core/cryptsetup/0001-Move-safe-table-params-wipe-into-function-which-allo.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/core/cryptsetup/0001-Move-safe-table-params-wipe-into-function-which-allo.patch b/core/cryptsetup/0001-Move-safe-table-params-wipe-into-function-which-allo.patch new file mode 100644 index 000000000..64bfa50ed --- /dev/null +++ b/core/cryptsetup/0001-Move-safe-table-params-wipe-into-function-which-allo.patch @@ -0,0 +1,37 @@ +From 2250d5f71f9dd66112d5c63367169f4e6af8ad70 Mon Sep 17 00:00:00 2001 +From: Milan Broz <gmazyland@gmail.com> +Date: Thu, 24 Jul 2014 11:37:24 +0200 +Subject: [PATCH 1/3] Move safe table params wipe into function which allocates + it. +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + lib/libdevmapper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/libdevmapper.c b/lib/libdevmapper.c +index 3ed87c0..8e5a696 100644 +--- a/lib/libdevmapper.c ++++ b/lib/libdevmapper.c +@@ -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; + } +-- +2.0.1 + |