Skip to content

Commit

Permalink
lib-program-client: test-program-client-net: Destroy test client upon…
Browse files Browse the repository at this point in the history
… error.

This prevents infinite input event loop when something goes wrong.
  • Loading branch information
stephanbosch authored and cmouse committed Mar 18, 2018
1 parent fe1de26 commit 2d9b387
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-program-client/test-program-client-net.c
Expand Up @@ -214,8 +214,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;

Expand Down

0 comments on commit 2d9b387

Please sign in to comment.