Source-Changes-HG archive

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

[src/trunk]: src/sys/net Add missing pserialize_read_exit in err...



details:   https://anonhg.NetBSD.org/src/rev/a62e63d117c7
branches:  trunk
changeset: 318558:a62e63d117c7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Apr 29 07:16:28 2018 +0000
description:
Add missing pserialize_read_exit in error branch, spotted during my
previous commit.

diffstat:

 sys/net/if_fddisubr.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 67cefcb6676d -r a62e63d117c7 sys/net/if_fddisubr.c
--- a/sys/net/if_fddisubr.c     Sun Apr 29 07:13:10 2018 +0000
+++ b/sys/net/if_fddisubr.c     Sun Apr 29 07:16:28 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_fddisubr.c,v 1.107 2018/04/29 07:13:10 maxv Exp $   */
+/*     $NetBSD: if_fddisubr.c,v 1.108 2018/04/29 07:16:28 maxv Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.107 2018/04/29 07:13:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.108 2018/04/29 07:16:28 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -330,8 +330,10 @@
                        struct llc llc;
 
                        M_PREPEND(m, sizeof(struct llc), M_NOWAIT);
-                       if (m == 0)
+                       if (m == NULL) {
+                               pserialize_read_exit(s);
                                senderr(ENOBUFS);
+                       }
                        llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP;
                        llc.llc_control = LLC_UI;
                        memcpy(llc.llc_snap_org_code, at_org_code,



Home | Main Index | Thread Index | Old Index