Re: [PATCH wayland] server: fix conditions for fds in wl_socket_destroy

2014-08-07 Thread Pekka Paalanen
On Thu, 7 Aug 2014 09:56:59 -0400 "Jasper St. Pierre" wrote: > Reviewed-by: Jasper St. Pierre Thanks, pushed. - pq > On Thu, Aug 7, 2014 at 9:51 AM, Pekka Paalanen wrote: > > > From: Pekka Paalanen > > > > 0 is also a valid fd, and needs to be closed. > > > > On error we set fd to -1. We n

Re: [PATCH wayland] server: fix conditions for fds in wl_socket_destroy

2014-08-07 Thread Jasper St. Pierre
Reviewed-by: Jasper St. Pierre On Thu, Aug 7, 2014 at 9:51 AM, Pekka Paalanen wrote: > From: Pekka Paalanen > > 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

[PATCH wayland] server: fix conditions for fds in wl_socket_destroy

2014-08-07 Thread Pekka Paalanen
From: Pekka Paalanen 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 Signed-