Ensure we correctly null out the referenced pointer when we decrease the ref. count.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov 4 21:12:13 CET 2011 on sn-devel-104
(cherry picked from commit 51c86c8e67c3b026f49136f5b6743c279cc206d2)