Explorar o código

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

Daniel-Constantin Mierla %!s(int64=10) %!d(string=hai) anos
pai
achega
e58d150a13
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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);