Module Name: src
Committed By: riastradh
Date: Wed Jul 24 04:01:51 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/include/linux [riastradh-drm2]: slab.h
Log Message:
Allow kfree(NULL).
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 \
src/sys/external/bsd/drm2/include/linux/slab.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/slab.h
diff -u src/sys/external/bsd/drm2/include/linux/slab.h:1.1.2.7 src/sys/external/bsd/drm2/include/linux/slab.h:1.1.2.8
--- src/sys/external/bsd/drm2/include/linux/slab.h:1.1.2.7 Wed Jul 24 04:00:19 2013
+++ src/sys/external/bsd/drm2/include/linux/slab.h Wed Jul 24 04:01:51 2013
@@ -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 @@ krealloc(void *ptr, size_t size, gfp_t g
static inline void
kfree(void *ptr)
{
- free(ptr, M_TEMP);
+ if (ptr != NULL)
+ free(ptr, M_TEMP);
}
#endif /* _LINUX_SLAB_H_ */