From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Nagaraj D R <nagaraj.dr@samsung.com>
Cc: "linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Syam Sidhardhan <s.syam@samsung.com>
Subject: Re: [PATCH] Fix Memory leak
Date: Mon, 21 May 2018 11:32:25 +0300 [thread overview]
Message-ID: <CABBYNZKYKtPepCw10m8gRT5GKAU9rSgAfgkWrgFdMocsjfHbHg@mail.gmail.com> (raw)
In-Reply-To: <1526615864-23577-1-git-send-email-nagaraj.dr@samsung.com>
Hi,
On Fri, May 18, 2018 at 6:57 AM, Nagaraj D R <nagaraj.dr@samsung.com> wrote:
> Memory associated with 'adv_data' will be leaked in case of
> 'generate_scan_rsp' failure
> ---
> src/advertising.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/advertising.c b/src/advertising.c
> index 441d0a2..b087b48 100644
> --- a/src/advertising.c
> +++ b/src/advertising.c
> @@ -752,6 +752,7 @@ static int refresh_adv(struct btd_adv_client *client, mgmt_request_func_t func)
> scan_rsp = generate_scan_rsp(client, &flags, &scan_rsp_len);
> if (!scan_rsp && scan_rsp_len) {
> error("Scan data couldn't be generated.");
> + free(adv_data);
> return -EINVAL;
> }
>
> --
> 1.9.1
Applied, thanks.
--
Luiz Augusto von Dentz
prev parent reply other threads:[~2018-05-21 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180518035758epcas1p180d3cc8c19a1fbdf2819a35d7062804d@epcas1p1.samsung.com>
2018-05-18 3:57 ` [PATCH] Fix Memory leak Nagaraj D R
2018-05-21 8:32 ` Luiz Augusto von Dentz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABBYNZKYKtPepCw10m8gRT5GKAU9rSgAfgkWrgFdMocsjfHbHg@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=nagaraj.dr@samsung.com \
--cc=s.syam@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).