From fe1de26fdb3eef8237b7d1250022e6cbbc17062e Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sun, 25 Feb 2018 18:30:12 +0100 Subject: [PATCH] lib-program-client: test-program-client-unix: Destroy test client upon error. This prevents infinite input event loop when something goes wrong. --- src/lib-program-client/test-program-client-unix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.47.3