Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Allow kfree(NULL).



details:   https://anonhg.NetBSD.org/src/rev/bacf2810a0ad
branches:  riastradh-drm2
changeset: 788488:bacf2810a0ad
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 04:01:51 2013 +0000

description:
Allow kfree(NULL).

diffstat:

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

diffs (19 lines):

diff -r 2495680e48ab -r bacf2810a0ad sys/external/bsd/drm2/include/linux/slab.h
--- a/sys/external/bsd/drm2/include/linux/slab.h        Wed Jul 24 04:01:37 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/slab.h        Wed Jul 24 04:01:51 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: slab.h,v 1.1.2.7 2013/07/24 04:00:19 riastradh Exp $   */
+/*     $NetBSD: slab.h,v 1.1.2.8 2013/07/24 04:01:51 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -89,7 +89,8 @@
 static inline void
 kfree(void *ptr)
 {
-       free(ptr, M_TEMP);
+       if (ptr != NULL)
+               free(ptr, M_TEMP);
 }
 
 #endif  /* _LINUX_SLAB_H_ */



Home | Main Index | Thread Index | Old Index