浏览代码

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);