提交 e887cecb authored 作者: Travis Cross's avatar Travis Cross

Avoid dereferencing potential null value

上级 2dea51ad
......@@ -32,7 +32,7 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
if (type && !strcasecmp(type, "text/disconnect-notice")) {
const char *dispo = esl_event_get_header(handle.last_event, "content-disposition");
esl_log(ESL_LOG_INFO, "Got a disconnection notice dispostion: [%s]\n", dispo ? dispo : "");
if (!strcmp(dispo, "linger")) {
if (dispo && !strcmp(dispo, "linger")) {
done = 1;
esl_log(ESL_LOG_INFO, "Waiting 5 seconds for any remaining events.\n");
exp = time(NULL) + 5;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论