Skip to content
Commit ced769ac authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

server: fix conditions for fds in wl_socket_destroy



0 is also a valid fd, and needs to be closed.

On error we set fd to -1. We need to also initialize fds to -1, so we do
not accidentally close stdout on error.

While fixing this, also remove one use-before-NULL-check.

Based on the patch by Marek.

Cc: Marek Chalupa <mchqwerty@gmail.com>
Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: default avatarJasper St. Pierre <jstpierre@mecheye.net>
parent 3a84e45a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment