]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID: 1210646
authorRaymond Chandler <intralanman@gmail.com>
Wed, 30 Apr 2014 22:46:59 +0000 (18:46 -0400)
committerRaymond Chandler <intralanman@gmail.com>
Wed, 30 Apr 2014 22:47:02 +0000 (18:47 -0400)
src/mod/applications/mod_translate/mod_translate.c

index 2ece5084d29b29084458b019f4053903c3ef86c5..5ed83d48c83cf5dbf8503bb50cb488fd52d24c20 100644 (file)
@@ -226,6 +226,8 @@ SWITCH_STANDARD_APP(translate_app_function)
        switch_memory_pool_t *pool;
        switch_event_t *event = NULL;
 
+       switch_assert(session);
+
        if (!(mydata = switch_core_session_strdup(session, data))) {
                goto end;
        }
@@ -255,11 +257,10 @@ SWITCH_STANDARD_APP(translate_app_function)
        }
 
 end:
-       if (!session) {
-               if (pool) {
-                       switch_core_destroy_memory_pool(&pool);
-               }
+       if (pool) {
+               switch_core_destroy_memory_pool(&pool);
        }
+
        return;
 }