2013-03-26 11:31:08

by Arkadiusz Lichwa

[permalink] [raw]
Subject: [PATCH] sdptool: Fix mem leak in do_search

From: Arkadiusz Lichwa <[email protected]>

---
tools/sdptool.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/sdptool.c b/tools/sdptool.c
index 0a949f2..eb09f65 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -3781,6 +3781,8 @@ static int do_search(bdaddr_t *bdaddr, struct search_context *context)
search = sdp_list_append(0, &context->group);
if (sdp_service_search_attr_req(sess, search, SDP_ATTR_REQ_RANGE, attrid, &seq)) {
printf("Service Search failed: %s\n", strerror(errno));
+ sdp_list_free(attrid, 0);
+ sdp_list_free(search, 0);
sdp_close(sess);
return -1;
}
--
1.7.12



2013-03-28 11:08:28

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] sdptool: Fix mem leak in do_search

Hi Arek,

On Tue, Mar 26, 2013, Arek Lichwa wrote:
> ---
> tools/sdptool.c | 2 ++
> 1 file changed, 2 insertions(+)

Applied. Thanks.

Johan