Fix Coverity ID 897: REVERSE_INULL
authorVolker Lendecke <vl@samba.org>
Wed, 6 May 2009 10:00:49 +0000 (12:00 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 12 May 2009 13:21:34 +0000 (15:21 +0200)
source/locking/locking.c

index 41fe1c96cc48182896ae6be794ec5a5aa240953d..7f2494adb55425f0ec61f5fae6857b3eba4061e9 100644 (file)
@@ -1364,11 +1364,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;
        }