1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Fix: Do not asume listener->id != NULL when looking for a listener with a specific ID

This commit is contained in:
Philipp Schafft 2018-08-08 08:59:34 +00:00
parent ec6a85529d
commit 03092d1049

View File

@ -476,7 +476,7 @@ static listensocket_t * listensocket_container_get_by_id(listensocket_container_
if (self->sock[i] != NULL) {
listener = listensocket_get_listener(self->sock[i]);
if (listener) {
if (strcmp(listener->id, id) == 0) {
if (listener->id != NULL && strcmp(listener->id, id) == 0) {
listensocket_release_listener(self->sock[i]);
if (refobject_ref(self->sock[i]) == 0) {
return self->sock[i];