Skip to content

Commit

Permalink
MT#55283 fix for NULL selected_sfd
Browse files Browse the repository at this point in the history
Fixes possible NULL dereference as selected_sfd can be NULL.

Fixes #1710

Change-Id: Ie9208d41e32278c52bec8c820435539c82343c28
  • Loading branch information
rfuchs committed Aug 25, 2023
1 parent 028eacd commit cbd217d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/media_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
else \
diff_ ## x ## _ ## io = (ke)->x - ks_val; \
atomic64_add(&ps->stats_ ## io.x, diff_ ## x ## _ ## io); \
atomic64_add(&ps->selected_sfd->local_intf->stats.io.x, diff_ ## x ## _ ## io); \
if (ps->selected_sfd) \
atomic64_add(&ps->selected_sfd->local_intf->stats.io.x, diff_ ## x ## _ ## io); \
RTPE_STATS_ADD(x ## _kernel, diff_ ## x ## _ ## io); \
} while (0)

Expand Down

0 comments on commit cbd217d

Please sign in to comment.