Fix Coverity ID 897: REVERSE_INULL
authorVolker Lendecke <vl@samba.org>
Wed, 6 May 2009 10:00:49 +0000 (12:00 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 6 May 2009 10:01:30 +0000 (12:01 +0200)
source3/locking/locking.c

index 70841225a70db04dc54e4f75f10b538997e3e2ec..dd735be88a32835d722c260e7b02449d464b3ad1 100644 (file)
@@ -1397,11 +1397,11 @@ bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USE
 
        if (fsp->conn->admin_user) {
                tok_copy = copy_unix_token(lck, tok);
-               tok_copy->uid = (uid_t)0;
                if (tok_copy == NULL) {
                        TALLOC_FREE(lck);
                        return false;
                }
+               tok_copy->uid = (uid_t)0;
                tok = tok_copy;
        }