Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd86e320 authored by Jeffy Chen's avatar Jeffy Chen Committed by Mike Snitzer
Browse files

dm crypt: fix memory leak in crypt_ctr_cipher_old()



Fix memory leak of cipher_api.

Fixes: 33d2f09f (dm crypt: introduce new format of cipher with "capi:" prefix)
Cc: stable@vger.kernel.org # 4.12+
Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 62e08243
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2466,6 +2466,7 @@ static int crypt_ctr_cipher_old(struct dm_target *ti, char *cipher_in, char *key
		kfree(cipher_api);
		return ret;
	}
	kfree(cipher_api);

	return 0;
bad_mem: