Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix use of curlwp_bind



details:   https://anonhg.NetBSD.org/src/rev/3f2eef4c047e
branches:  trunk
changeset: 822328:3f2eef4c047e
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Mar 14 08:35:55 2017 +0000

description:
Fix use of curlwp_bind

There was an error path that returned without curlwp_bindx.

diffstat:

 sys/net/rtsock.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 3e26ab44ce36 -r 3f2eef4c047e sys/net/rtsock.c
--- a/sys/net/rtsock.c  Tue Mar 14 08:27:13 2017 +0000
+++ b/sys/net/rtsock.c  Tue Mar 14 08:35:55 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.205 2017/03/14 08:11:09 ozaki-r Exp $     */
+/*     $NetBSD: rtsock.c,v 1.206 2017/03/14 08:35:55 ozaki-r Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.205 2017/03/14 08:11:09 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.206 2017/03/14 08:35:55 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1638,7 +1638,7 @@
                               struct rt_addrinfo *);
        int s;
        struct psref psref;
-       int bound = curlwp_bind();
+       int bound;
 
        switch (type) {
        case NET_RT_IFLIST:
@@ -1676,6 +1676,7 @@
 
        memset(&info, 0, sizeof(info));
 
+       bound = curlwp_bind();
        s = pserialize_read_enter();
        IFNET_READER_FOREACH(ifp) {
                int _s;



Home | Main Index | Thread Index | Old Index