提交 bd86e320 编写于 作者: J Jeffy Chen 提交者: Mike Snitzer

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: NJeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 62e08243
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册