]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Whoops!
authorAndrew Thompson <andrew@hijacked.us>
Fri, 3 Apr 2009 17:52:38 +0000 (17:52 +0000)
committerAndrew Thompson <andrew@hijacked.us>
Fri, 3 Apr 2009 17:52:38 +0000 (17:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12906 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c

index e029c07e7772afde3a722652e25fbb55eb196b54..921c33da775d14dab96c616908cb8e775d5d4b70 100644 (file)
@@ -1145,12 +1145,12 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul
 
                session_element->process.type = ERLANG_PID;
                memcpy(&session_element->process.pid, pid, sizeof(erlang_pid));
-               switch_safe_free(pid); /* malloced in handle_ref_tuple */
                switch_set_flag(session_element, LFLAG_SESSION_ALIVE);
                switch_clear_flag(session_element, LFLAG_OUTBOUND_INIT);
                switch_clear_flag(session_element, LFLAG_WAITING_FOR_PID);
 
-               ei_link(listener, ei_self(listener->ec), pid); 
+               ei_link(listener, ei_self(listener->ec), pid);
+               switch_safe_free(pid); /* malloced in handle_ref_tuple */
        }
        return session_element;
 }