Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Clean up pipe structure before recycling it.



details:   https://anonhg.NetBSD.org/src/rev/db10d7d2b1b7
branches:  trunk
changeset: 450815:db10d7d2b1b7
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Fri Apr 26 17:20:49 2019 +0000

description:
Clean up pipe structure before recycling it.

diffstat:

 sys/kern/sys_pipe.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 25de3b6690bd -r db10d7d2b1b7 sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c       Fri Apr 26 16:56:57 2019 +0000
+++ b/sys/kern/sys_pipe.c       Fri Apr 26 17:20:49 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_pipe.c,v 1.146 2018/06/10 17:54:51 jdolecek Exp $  */
+/*     $NetBSD: sys_pipe.c,v 1.147 2019/04/26 17:20:49 mlelstv Exp $   */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.146 2018/06/10 17:54:51 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.147 2019/04/26 17:20:49 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1331,6 +1331,8 @@
     free_resources:
        pipe->pipe_pgid = 0;
        pipe->pipe_state = PIPE_SIGNALR;
+       pipe->pipe_peer = NULL;
+       pipe->pipe_lock = NULL;
        pipe_free_kmem(pipe);
        if (pipe->pipe_kmem != 0) {
                pool_cache_put(pipe_rd_cache, pipe);



Home | Main Index | Thread Index | Old Index