Avoid dereferencing potential null value

This commit is contained in:
Travis Cross 2013-05-28 03:41:44 +00:00
parent 83e33bb399
commit ca9d806042
1 changed files with 1 additions and 1 deletions

View File

@ -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")) { if (type && !strcasecmp(type, "text/disconnect-notice")) {
const char *dispo = esl_event_get_header(handle.last_event, "content-disposition"); 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 : ""); 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; done = 1;
esl_log(ESL_LOG_INFO, "Waiting 5 seconds for any remaining events.\n"); esl_log(ESL_LOG_INFO, "Waiting 5 seconds for any remaining events.\n");
exp = time(NULL) + 5; exp = time(NULL) + 5;