From 36f4957587dd39073e2de2ffd98f65b0afe8d3cb Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Fri, 13 Mar 2015 09:02:38 +0100 Subject: [PATCH] lowntfs-3g.c: Fix uninitialized variable warning in ntfs_fuse_getxattr. The variable 'res' was never initialized if the #ifdef condition '!KERNELPERMS | (POSIXACLS & !KERNELACLS)' evaluated to true and there was an error allocating memory for 'value'. --- src/lowntfs-3g.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 6bf57593..35efbed4 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -2982,7 +2982,6 @@ static void ntfs_fuse_getxattr(fuse_req_t req, fuse_ino_t ino, const char *name, set_fuse_error(&res); } else res = -errno; - } #else /* * Standard access control has been done by fuse/kernel @@ -3004,9 +3003,9 @@ static void ntfs_fuse_getxattr(fuse_req_t req, fuse_ino_t ino, const char *name, set_fuse_error(&res); } else res = -errno; +#endif } else res = -errno; -#endif if (res < 0) fuse_reply_err(req, -res); else