Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by msait...



details:   https://anonhg.NetBSD.org/src/rev/6a6fca974bf6
branches:  netbsd-8
changeset: 451293:6a6fca974bf6
user:      martin <martin%NetBSD.org@localhost>
date:      Tue May 14 11:37:12 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1266):

        sys/net/if_media.c: revision 1.42 (via patch)

Add missing error check.

diffstat:

 sys/net/if_media.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 61ca42b1701a -r 6a6fca974bf6 sys/net/if_media.c
--- a/sys/net/if_media.c        Tue May 14 11:33:42 2019 +0000
+++ b/sys/net/if_media.c        Tue May 14 11:37:12 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_media.c,v 1.32.6.2 2018/01/02 10:20:33 snj Exp $    */
+/*     $NetBSD: if_media.c,v 1.32.6.3 2019/05/14 11:37:12 martin Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.32.6.2 2018/01/02 10:20:33 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.32.6.3 2019/05/14 11:37:12 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -335,6 +335,9 @@
                            : nwords;
                        int *kptr = (int *)malloc(minwords * sizeof(int),
                            M_TEMP, M_WAITOK);
+
+                       if (kptr == NULL)
+                               return ENOMEM;
                        /*
                         * Get the media words from the interface's list.
                         */



Home | Main Index | Thread Index | Old Index