Module: xenomai-3
Branch: master
Commit: caf0a0b4a3f279e3e4bd42e6b62bc09fab4fba94
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=caf0a0b4a3f279e3e4bd42e6b62bc09fab4fba94

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Oct 30 14:44:07 2014 +0100

drivers/ipc/xddp: fix memory leak on connection release

---

 kernel/drivers/ipc/xddp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/drivers/ipc/xddp.c b/kernel/drivers/ipc/xddp.c
index 8f1333d..efb4a41 100644
--- a/kernel/drivers/ipc/xddp.c
+++ b/kernel/drivers/ipc/xddp.c
@@ -207,7 +207,8 @@ static void __xddp_release_handler(void *skarg) /* nklock 
free */
                poolsz = xnheap_get_size(&sk->privpool);
                xnheap_destroy(&sk->privpool);
                free_pages_exact(poolmem, poolsz);
-       }
+       } else if (sk->buffer)
+               xnfree(sk->buffer);
 
        kfree(sk);
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to