Browse Source

MT#55283 fix possible null deref

selected_sfd can be NULL, especially in send-error cases

Change-Id: I828dc8556639619fc0cb8f340889ded32dac6de8
pull/1623/head
Richard Fuchs 3 years ago
parent
commit
91340fa947
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      daemon/media_socket.c

+ 4
- 1
daemon/media_socket.c View File

@ -1640,6 +1640,8 @@ void media_update_stats(struct call_media *m) {
continue;
if (PS_ISSET(ps, NO_KERNEL_SUPPORT))
continue;
if (!ps->selected_sfd)
continue;
__stream_update_stats(ps, false);
}
@ -2669,7 +2671,8 @@ next_mirror:
err_next:
ilog(LOG_DEBUG | LOG_FLAG_LIMIT ,"Error when sending message. Error: %s", strerror(errno));
atomic64_inc(&sink->stats_in.errors);
atomic64_inc(&sink->selected_sfd->local_intf->stats.out.errors);
if (sink->selected_sfd)
atomic64_inc(&sink->selected_sfd->local_intf->stats.out.errors);
RTPE_STATS_INC(errors_user);
goto next;


Loading…
Cancel
Save