From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:47492 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934137AbdJJUGA (ORCPT ); Tue, 10 Oct 2017 16:06:00 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeffy Chen , Mike Snitzer Subject: [PATCH 4.13 143/160] dm crypt: fix memory leak in crypt_ctr_cipher_old() Date: Tue, 10 Oct 2017 21:51:11 +0200 Message-Id: <20171010190555.306017757@linuxfoundation.org> In-Reply-To: <20171010190548.690912997@linuxfoundation.org> References: <20171010190548.690912997@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org List-ID: 4.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jeffy Chen commit bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc upstream. Fix memory leak of cipher_api. Fixes: 33d2f09fcb35 (dm crypt: introduce new format of cipher with "capi:" prefix) Signed-off-by: Jeffy Chen Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-crypt.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2470,6 +2470,7 @@ static int crypt_ctr_cipher_old(struct d kfree(cipher_api); return ret; } + kfree(cipher_api); return 0; bad_mem: