소스 검색

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

Daniel-Constantin Mierla 10 년 전
부모
커밋
e58d150a13
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);