From: anderson.lizardo@openbossa.org
To: linux-bluetooth@vger.kernel.org
Cc: Anderson Lizardo <anderson.lizardo@openbossa.org>
Subject: [PATCH v2] Fix memory leak of unused EIR name
Date: Mon, 20 Dec 2010 11:32:19 -0400 [thread overview]
Message-ID: <4d0f7725.81a5e60a.143c.2315@mx.google.com> (raw)
In-Reply-To: <1292852295-11104-1-git-send-email-anderson.lizardo@openbossa.org>
From: Anderson Lizardo <anderson.lizardo@openbossa.org>
There is a code path in btd_event_device_found() where the EIR name is
not used. This requires freeing eir_data.name to avoid a leak.
---
src/event.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/event.c b/src/event.c
index 3603643..22f4f72 100644
--- a/src/event.c
+++ b/src/event.c
@@ -527,6 +527,7 @@ void btd_event_device_found(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
/* if found: don't send the name again */
dev = adapter_search_found_devices(adapter, &match);
if (dev) {
+ g_free(eir_data.name);
adapter_update_found_devices(adapter, peer, rssi, class,
NULL, NULL, dev->legacy,
eir_data.services,
--
1.7.0.4
next prev parent reply other threads:[~2010-12-20 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 13:38 [PATCH] Fix memory leak of unused EIR name Anderson Lizardo
2010-12-20 15:32 ` anderson.lizardo [this message]
2010-12-20 15:36 ` [PATCH v2] " Johan Hedberg
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=4d0f7725.81a5e60a.143c.2315@mx.google.com \
--to=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.