From: William King Date: Tue, 23 Apr 2013 17:22:49 +0000 (-0700) Subject: If the rsession is null, then don't try to unlock it, since that'll just result in... X-Git-Tag: v1.2.9~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198ae2fa0503c643c5f01cc3b8ee759566eb9145;p=thirdparty%2Ffreeswitch.git If the rsession is null, then don't try to unlock it, since that'll just result in a segfault. --- diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index d68278c5db..36c295a274 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -462,7 +462,7 @@ switch_status_t rtmp_write_frame(switch_core_session_t *session, switch_frame_t rsession = tech_pvt->rtmp_session; if ( rsession == NULL ) { - goto error; + goto error_null; } switch_thread_rwlock_wrlock(rsession->rwlock); @@ -514,7 +514,9 @@ switch_status_t rtmp_write_frame(switch_core_session_t *session, switch_frame_t error: switch_thread_rwlock_unlock(rsession->rwlock); - return SWITCH_STATUS_FALSE; + + error_null: + return SWITCH_STATUS_FALSE; }