From 42d2755b32f5d840abb7a67e611977adef8e6f7c Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sun, 25 Feb 2018 17:56:15 +0100 Subject: [PATCH] lib-program-client: test-program-client-unix: Create body stream only once in test_program_input_handle(). --- src/lib-program-client/test-program-client-unix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib-program-client/test-program-client-unix.c b/src/lib-program-client/test-program-client-unix.c index 386bfd48ff..19ecc5d20d 100644 --- a/src/lib-program-client/test-program-client-unix.c +++ b/src/lib-program-client/test-program-client-unix.c @@ -106,8 +106,10 @@ test_program_input_handle(struct test_client *client, const char *line) array_append(&client->args, &arg, 1); break; case CLIENT_STATE_BODY: - client->os_body = iostream_temp_create_named( - ".dovecot.test.", 0, "test_program_input body"); + if (client->os_body == NULL) { + client->os_body = iostream_temp_create_named( + ".dovecot.test.", 0, "test_program_input body"); + } switch(o_stream_send_istream(client->os_body, client->in)) { case OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT: i_panic("Cannot write to ostream-temp: %s",