]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Avoid dereferencing potential null value
authorTravis Cross <tc@traviscross.com>
Tue, 28 May 2013 03:41:44 +0000 (03:41 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 29 May 2013 02:51:57 +0000 (02:51 +0000)
libs/esl/testserver.c

index 1477d8d71ebc489d6b8f7a7645f643da2f6a0019..f8eb78d1f3dc9202114b2dc97c2646b16de2b390 100644 (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")) {
                                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;