commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] Debian GNU Hurd packaging branch, master, updated. debian/20111106


From: Samuel Thibault
Subject: [SCM] Debian GNU Hurd packaging branch, master, updated. debian/20111106-1-43-gcf5a1c2
Date: Tue, 06 Dec 2011 00:48:31 +0000

The following commit has been merged in the master branch:
commit fa5e833a50c1e18cee29ca7fb660cc423904a024
Author: Samuel Thibault <address@hidden>
Date:   Sun Nov 27 23:03:15 2011 +0100

    Fix source address reference accounting
    
    * libpipe/pipe.c (pipe_recv): If `source' is NULL but packet source exists,
    dereference it.
    * pflocal/io.c (S_io_write): Only dereference the source on errors.

diff --git a/libpipe/pipe.c b/libpipe/pipe.c
index 914816b..4580b3a 100644
--- a/libpipe/pipe.c
+++ b/libpipe/pipe.c
@@ -383,6 +383,8 @@ pipe_recv (struct pipe *pipe, int noblock, unsigned *flags, 
void **source,
 
          if (source)
            packet_read_source (packet, source);
+         else if (packet->source)
+           pipe_dealloc_addr(packet->source);
 
          err = (*pipe->class->read)(packet, &dq, flags,
                                     data, data_len, amount);
diff --git a/pflocal/io.c b/pflocal/io.c
index 74c2f97..36221a6 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -106,7 +106,7 @@ S_io_write (struct sock_user *user,
        {
          err = pipe_write (pipe, user->sock->flags & SOCK_NONBLOCK,
                            source_addr, data, data_len, amount);
-         if (source_addr)
+         if (err && source_addr)
            ports_port_deref (source_addr);
        }
 

-- 
Debian GNU Hurd packaging



reply via email to

[Prev in Thread] Current Thread [Next in Thread]