1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|