]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix cppcheck error: set *listenerp to NULL.
authorMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 06:43:46 +0000 (16:43 +1000)
committerMark Andrews <marka@isc.org>
Tue, 1 Oct 2019 11:28:19 +0000 (21:28 +1000)
bin/named/lwresd.c

index cdf11f5b68745ac124c5f9d7d8a065028291ab13..37be6584e3540748c6cd7400fc981b81e33d1ac3 100644 (file)
@@ -9,8 +9,6 @@
  * information regarding copyright ownership.
  */
 
-/* $Id: lwresd.c,v 1.60 2009/09/02 23:48:01 tbox Exp $ */
-
 /*! \file
  * \brief
  * Main program for the Lightweight Resolver Daemon.
@@ -493,6 +491,7 @@ ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
        INSIST(VALID_LWRESLISTENER(*listenerp));
 
        listener = *listenerp;
+       *listenerp = NULL;
 
        LOCK(&listener->lock);
        INSIST(listener->refs > 0);
@@ -514,7 +513,6 @@ ns_lwreslistener_detach(ns_lwreslistener_t **listenerp) {
        mctx = listener->mctx;
        isc_mem_put(mctx, listener, sizeof(*listener));
        isc_mem_detach(&mctx);
-       listenerp = NULL;
 }
 
 static isc_result_t