]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't deref null.
authorMichael Jerris <mike@jerris.com>
Wed, 22 Oct 2008 03:03:43 +0000 (03:03 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 22 Oct 2008 03:03:43 +0000 (03:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10106 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_session.c

index 954a225df6f7fb88d84d4beec5ce1405b7ffaac2..609093be746d15388da4b051db507f87d202eb8e 100644 (file)
@@ -790,11 +790,12 @@ SWITCH_STANDARD_SCHED_FUNC(sch_heartbeat_callback)
                switch_event_create(&event, SWITCH_EVENT_SESSION_HEARTBEAT);
                switch_channel_event_set_data(session->channel, event);
                switch_event_fire(&event);
+
+               /* reschedule this task */
+               task->runtime = switch_timestamp(NULL) + session->track_duration;
+
                switch_core_session_rwunlock(session);
        }
-
-       /* reschedule this task */
-       task->runtime = switch_timestamp(NULL) + session->track_duration;
 }
 
 SWITCH_DECLARE(void) switch_core_session_unsched_heartbeat(switch_core_session_t *session)