From 1fefe1a6698e30b516b8de3bc2a2a8a00bbf1dc3 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Tue, 13 Sep 2016 21:34:13 +0100 Subject: [PATCH] Close socket fix, might relate to migration crashing This was listed as a bug, and was immediatelly picked the static analyzer anyway, this is very likely the cause for the migration-cancel-crash bug. Signed-off-by: Michel Pollet --- src/server/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/mirror.c b/src/server/mirror.c index e95dc53..896399f 100644 --- a/src/server/mirror.c +++ b/src/server/mirror.c @@ -922,7 +922,7 @@ void* mirror_runner(void* serve_params_uncast) * for us ). But if we've failed and are going to retry on the next run, we * must close this socket here to have any chance of it succeeding. */ - if ( !mirror->client < 0 ) { + if ( !(mirror->client < 0) ) { sock_try_close( mirror->client ); mirror->client = -1; }