2011-03-04 18:32:00

by Szymon Janc

[permalink] [raw]
Subject: [PATCH] Fix small memleak in compat/pand.c

---
compat/pand.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/compat/pand.c b/compat/pand.c
index c3860fa..b82650e 100644
--- a/compat/pand.c
+++ b/compat/pand.c
@@ -456,10 +456,13 @@ static void do_show(void)

static void do_kill(char *dst)
{
- if (dst)
- bnep_kill_connection((void *) strtoba(dst));
- else
+ if (dst) {
+ bdaddr_t *ba = strtoba(dst);
+ bnep_kill_connection((void *) ba);
+ free(ba);
+ } else {
bnep_kill_all_connections();
+ }
}

static void sig_hup(int sig)
--
1.7.0.4
on behalf of ST-Ericsson


2011-03-04 18:57:41

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Fix small memleak in compat/pand.c

Hi Szymon,

On Fri, Mar 04, 2011, Szymon Janc wrote:
> ---
> compat/pand.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)

Both memleak patches have been applied. Thanks.

Johan