udscs: Fix a potential NULL pointer dereference
commit2dc986fcaf51aff1e307df469da8feeb86574111
authorFrancois Gouget <fgouget@codeweavers.com>
Thu, 1 Dec 2016 04:19:33 +0000 (1 05:19 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Thu, 1 Dec 2016 10:28:38 +0000 (1 11:28 +0100)
tree4a6318b0b41ff9491b528b02191133d8049df329
parent8f1c3c3135cc40aef3129446fc01bdec9d7a9be5
udscs: Fix a potential NULL pointer dereference

udscs_server_fill_fds() should accept being passed a NULL pointer.
udscs_server_fill_fds() is dereferencing the 'server' pointer, and then
checks if it's NULL. This commit makes sure the NULL check happens
first.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
src/udscs.c