diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index 79d5a7626a..5226bad829 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -1219,11 +1219,7 @@ switch_status_t rtmp_session_logout(rtmp_session_t *rsession, const char *user, switch_thread_rwlock_wrlock(rsession->account_rwlock); for (account = rsession->account; account; account = account->next) { if (!strcmp(account->user, user) && !strcmp(account->domain, domain)) { - if (prev) { - prev->next = account->next; - } else { - rsession->account = account->next; - } + rsession->account = account->next; } } switch_thread_rwlock_unlock(rsession->account_rwlock);