From: Stephan Bosch Date: Sun, 25 Feb 2018 17:30:12 +0000 (+0100) Subject: lib-program-client: test-program-client-unix: Destroy test client upon error. X-Git-Tag: 2.3.9~2092 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe1de26fdb3eef8237b7d1250022e6cbbc17062e;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: test-program-client-unix: Destroy test client upon error. This prevents infinite input event loop when something goes wrong. --- diff --git a/src/lib-program-client/test-program-client-unix.c b/src/lib-program-client/test-program-client-unix.c index f4312f1a40..60841270ad 100644 --- a/src/lib-program-client/test-program-client-unix.c +++ b/src/lib-program-client/test-program-client-unix.c @@ -179,8 +179,10 @@ static void test_program_input(struct test_client *client) } } - if (ret < 0 || client->in->stream_errno != 0) + if (ret < 0 || client->in->stream_errno != 0) { + test_program_client_destroy(&client); return; + } if (!client->in->eof) return;