Make metze happy and the code clearer :-).
authorJeremy Allison <jra@samba.org>
Tue, 11 Sep 2012 23:16:37 +0000 (16:16 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 12 Sep 2012 01:00:20 +0000 (03:00 +0200)
Ensure we know after the destructor fires we're never going to
look at this again.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 12 03:00:21 CEST 2012 on sn-devel-104

source3/smbd/smb2_sesssetup.c

index 61b5519d979dc2702ddfcce1356eb05f7e31f8e1..2599d2a63dabf713fe709f699018866c6ef4a38f 100644 (file)
@@ -446,6 +446,12 @@ struct smbd_smb2_session_setup_state {
 static int pp_self_ref_destructor(struct smbd_smb2_session_setup_state **pp_state)
 {
        (*pp_state)->session = NULL;
+       /*
+        * To make things clearer, ensure the pp_self_ref
+        * pointer is nulled out. We're never going to
+        * access this again.
+        */
+       (*pp_state)->pp_self_ref = NULL;
        return 0;
 }