2014-12-04 08:50:55

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] shared/crypto: Fix resource leak

From: Andrei Emeltchenko <[email protected]>

Fix leaking fd on exit
---
src/shared/crypto.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/shared/crypto.c b/src/shared/crypto.c
index 12ca9a7..7f77674 100644
--- a/src/shared/crypto.c
+++ b/src/shared/crypto.c
@@ -594,6 +594,8 @@ static bool aes_cmac(struct bt_crypto *crypto, uint8_t key[16], uint8_t *msg,

swap_buf(out, res, 16);

+ close(fd);
+
return true;
}

--
1.9.1



2014-12-04 09:13:50

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] shared/crypto: Fix resource leak

Hi Andrei,

On Thu, Dec 04, 2014, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> Fix leaking fd on exit
> ---
> src/shared/crypto.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied. Thanks.

Johan