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/0940b521908e
branches:  trunk
changeset: 998682:0940b521908e
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 cc9b6bcd6f59 -r 0940b521908e 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