Explorar o código

qnetd: Assert dpd timer entry exists

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse hai 7 meses
pai
achega
983374d1c7
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      qdevices/qnetd-client-dpd-timer.c

+ 4 - 0
qdevices/qnetd-client-dpd-timer.c

@@ -32,6 +32,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <assert.h>
+
 #include "log.h"
 #include "qnetd-client-dpd-timer.h"
 
@@ -42,6 +44,8 @@ qnetd_dpd_timer_cb(void *data1, void *data2)
 
 	client = (struct qnetd_client *)data1;
 
+	assert(client->dpd_timer != NULL);
+
 	log(LOG_WARNING, "Client %s doesn't sent any message during "
 	    "%" PRIu32 "ms. Disconnecting",
 	    client->addr_str,