Explorar o código

make xattr_resolve_handlers() safe to use with NULL ->s_xattr

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro %!s(int64=9) %!d(string=hai) anos
pai
achega
0040773bff
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      fs/xattr.c

+ 1 - 0
fs/xattr.c

@@ -655,6 +655,7 @@ strcmp_prefix(const char *a, const char *a_prefix)
  * operations to the correct xattr_handler.
  */
 #define for_each_xattr_handler(handlers, handler)		\
+	if (handlers)						\
 		for ((handler) = *(handlers)++;			\
 			(handler) != NULL;			\
 			(handler) = *(handlers)++)