r15826: ensure we don't dereference sec when NULL
authorAndrew Tridgell <tridge@samba.org>
Tue, 23 May 2006 03:53:23 +0000 (03:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:28 +0000 (14:08 -0500)
(This used to be commit b6bf6b17cd92a3869c49209bc8ea8ef8c6c25cdd)

source4/ntvfs/unixuid/vfs_unixuid.c

index 9afb2b1380f89e2dc7a0882cb13f833da4b886a3..b12339b2c871fe429d94222f747a5980bfc83586 100644 (file)
@@ -191,7 +191,8 @@ static NTSTATUS unixuid_setup_security(struct ntvfs_module_context *ntvfs,
        NTSTATUS status2; \
        struct unix_sec_ctx *sec; \
        status = unixuid_setup_security(ntvfs, req, &sec); \
-       if (NT_STATUS_IS_OK(status)) status = ntvfs_next_##op args; \
+       NT_STATUS_NOT_OK_RETURN(status); \
+       status = ntvfs_next_##op args; \
        status2 = set_unix_security(sec); \
        if (!NT_STATUS_IS_OK(status2)) smb_panic("Unable to reset security context"); \
 } while (0)