Sfoglia il codice sorgente

tcpops: return if connection is null when trying to set the lifetime

Daniel-Constantin Mierla 10 anni fa
parent
commit
e58d150a13
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      modules/tcpops/tcpops.c

+ 1 - 0
modules/tcpops/tcpops.c

@@ -174,6 +174,7 @@ int tcpops_keepalive_disable(int fd, int closefd)
 int tcpops_set_connection_lifetime(struct tcp_connection* con, int time) {
 	if (unlikely(con == NULL)) {
 		LM_CRIT("BUG: con == NULL");
+		return -1;
 	}
 	if (unlikely(time < 0)) {
 		LM_ERR("Invalid timeout value, %d, must be >= 0\n", time);