Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include/linux Linux vfree accepts NULL...



details:   https://anonhg.NetBSD.org/src/rev/a4a4bb9e8933
branches:  trunk
changeset: 366290:a4a4bb9e8933
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:40:56 2018 +0000

description:
Linux vfree accepts NULL as noop.  Match semantics.

>From mrg@.

diffstat:

 sys/external/bsd/drm2/include/linux/vmalloc.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 8fe8675a7ce4 -r a4a4bb9e8933 sys/external/bsd/drm2/include/linux/vmalloc.h
--- a/sys/external/bsd/drm2/include/linux/vmalloc.h     Mon Aug 27 14:40:44 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/vmalloc.h     Mon Aug 27 14:40:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmalloc.h,v 1.6 2018/08/27 13:44:54 riastradh Exp $    */
+/*     $NetBSD: vmalloc.h,v 1.7 2018/08/27 14:40:56 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013, 2018 The NetBSD Foundation, Inc.
@@ -72,6 +72,8 @@
 static inline void
 vfree(void *ptr)
 {
+       if (ptr == NULL)
+               return;
        return free(ptr, M_TEMP);
 }
 



Home | Main Index | Thread Index | Old Index