]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1025849 Dereference before null check
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 18:12:28 +0000 (18:12 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 18:12:28 +0000 (18:12 +0000)
src/mod/applications/mod_cidlookup/mod_cidlookup.c

index 34d2104d5fc847e88d0c09af314ee0c858c540f0..72a1c99b775e847fcc80ab1ff68e41397abf7abf 100644 (file)
@@ -657,11 +657,7 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
        switch_bool_t skipurl = SWITCH_FALSE;
        switch_bool_t skipcitystate = SWITCH_FALSE;
 
-       if (session) {
-               pool = switch_core_session_get_pool(session);
-       } else {
-               switch_core_new_memory_pool(&pool);
-       }
+       pool = switch_core_session_get_pool(session);
        switch_event_create(&event, SWITCH_EVENT_MESSAGE);
 
        if (!(mydata = switch_core_session_strdup(session, data))) {