From 6cede067a246a96e845f2c285befc10a5a4282da Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Mon, 22 Aug 2011 21:53:48 +0000 Subject: [PATCH] Fix two mem leaks in crypt_init_by_name_and_header(). (Thanks to okozina@redhat.com) git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@601 36d66b0a-2a48-0410-832c-cd162a569da5 --- lib/setup.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/setup.c b/lib/setup.c index e91bf493..1e5b5ae0 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -636,7 +636,6 @@ int crypt_init_by_name_and_header(struct crypt_device **cd, } if (isPLAIN((*cd)->type)) { - (*cd)->type = strdup(CRYPT_PLAIN); (*cd)->plain_uuid = strdup(dmd.uuid); (*cd)->plain_hdr.hash = NULL; /* no way to get this */ (*cd)->plain_hdr.offset = dmd.offset; @@ -648,7 +647,6 @@ int crypt_init_by_name_and_header(struct crypt_device **cd, (*cd)->plain_cipher_mode = strdup(cipher_mode); } } else if (isLOOPAES((*cd)->type)) { - (*cd)->type = strdup(CRYPT_LOOPAES); (*cd)->loopaes_uuid = strdup(dmd.uuid); (*cd)->loopaes_hdr.offset = dmd.offset;