This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit bc170131016969f1d79409337833046ae1f4501b
Author: Richard Braun <[email protected]>
Date:   Tue Jun 14 14:01:12 2016 +0200

    pfinet: fix memory leak
    
    * pfinet/socket-ops.c (S_socket_recv): Unmap data on error.
---
 pfinet/socket-ops.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
index 14b3120..c768602 100644
--- a/pfinet/socket-ops.c
+++ b/pfinet/socket-ops.c
@@ -521,7 +521,11 @@ S_socket_recv (struct sock_user *user,
   pthread_mutex_unlock (&global_lock);
 
   if (err < 0)
-    err = -err;
+    {
+      err = -err;
+      if (alloced)
+       munmap (*data, amount);
+    }
   else
     {
       *datalen = err;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git

Reply via email to