Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libwg Fix order of cleanup actions in rumpu...



details:   https://anonhg.NetBSD.org/src/rev/7c90fd39c602
branches:  trunk
changeset: 943113:7c90fd39c602
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Aug 27 02:51:15 2020 +0000

description:
Fix order of cleanup actions in rumpuser_wg_create error branch.

diffstat:

 sys/rump/net/lib/libwg/wg_user.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r d411e48355e2 -r 7c90fd39c602 sys/rump/net/lib/libwg/wg_user.c
--- a/sys/rump/net/lib/libwg/wg_user.c  Thu Aug 27 02:50:44 2020 +0000
+++ b/sys/rump/net/lib/libwg/wg_user.c  Thu Aug 27 02:51:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wg_user.c,v 1.2 2020/08/27 02:50:44 riastradh Exp $    */
+/*     $NetBSD: wg_user.c,v 1.3 2020/08/27 02:51:15 riastradh Exp $    */
 
 /*
  * Copyright (C) Ryota Ozaki <ozaki.ryota%gmail.com@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wg_user.c,v 1.2 2020/08/27 02:50:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wg_user.c,v 1.3 2020/08/27 02:51:15 riastradh Exp $");
 
 #ifndef _KERNEL
 #include <sys/types.h>
@@ -277,13 +277,13 @@
        return 0;
 
  oerr5:
-       close(wgu->wgu_pipe[0]);
-       close(wgu->wgu_pipe[1]);
- oerr4:
        if (wgu->wgu_sock4 != -1)
                close(wgu->wgu_sock4);
        if (wgu->wgu_sock6 != -1)
                close(wgu->wgu_sock6);
+ oerr4:
+       close(wgu->wgu_pipe[0]);
+       close(wgu->wgu_pipe[1]);
  oerr3:
        close_tun(wgu);
  oerr2:



Home | Main Index | Thread Index | Old Index