From: Stephan Bosch Date: Sun, 25 Feb 2018 16:56:15 +0000 (+0100) Subject: lib-program-client: test-program-client-unix: Create body stream only once in test_pr... X-Git-Tag: 2.3.9~2096 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42d2755b32f5d840abb7a67e611977adef8e6f7c;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: test-program-client-unix: Create body stream only once in test_program_input_handle(). --- 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",