if (conn->iter_ctx != NULL)
master_input_list_finish(conn->iter_ctx);
- if (conn->input != NULL)
- i_stream_close(conn->input);
- if (conn->output != NULL)
- o_stream_close(conn->output);
+ i_stream_close(conn->input);
+ o_stream_close(conn->output);
io_remove(&conn->io);
i_close_fd_path(&conn->fd, conn->path);
DLLIST_REMOVE(&auth_postfix_connections, conn);
- if (conn->input != NULL)
- i_stream_close(conn->input);
- if (conn->output != NULL)
- o_stream_close(conn->output);
+ i_stream_close(conn->input);
+ o_stream_close(conn->output);
io_remove(&conn->io);
i_close_fd_path(&conn->fd, conn->path);
dns_lookup_abort(&client->dns_lookup);
timeout_remove(&client->to);
io_remove(&client->io);
- if (client->input != NULL)
- i_stream_close(client->input);
- if (client->output != NULL)
- o_stream_close(client->output);
+ i_stream_close(client->input);
+ o_stream_close(client->output);
if (client->fd != -1) {
net_disconnect(client->fd);
client->fd = -1;
i_zero(&conn->last_input_tv);
timeout_remove(&conn->to);
io_remove(&conn->io);
- if (conn->input != NULL) {
- i_stream_close(conn->input);
- i_stream_destroy(&conn->input);
- }
- if (conn->output != NULL) {
- o_stream_close(conn->output);
- o_stream_destroy(&conn->output);
- }
+ i_stream_close(conn->input);
+ i_stream_destroy(&conn->input);
+ o_stream_close(conn->output);
+ o_stream_destroy(&conn->output);
fd_close_maybe_stdio(&conn->fd_in, &conn->fd_out);
}
struct seekable_istream *sstream = (struct seekable_istream *)stream;
sstream->fd = -1;
- if (sstream->fd_input != NULL)
- i_stream_close(sstream->fd_input);
+ i_stream_close(sstream->fd_input);
}
static void unref_streams(struct seekable_istream *sstream)
{
struct istream_private *_stream = (struct istream_private *)stream;
- if (close_parent && _stream->parent != NULL)
+ if (close_parent)
i_stream_close(_stream->parent);
}
struct ostream_private *_stream = (struct ostream_private *)stream;
(void)o_stream_flush(&_stream->ostream);
- if (close_parent && _stream->parent != NULL)
+ if (close_parent)
o_stream_close(_stream->parent);
}
o_stream_uncork(client->output);
if (!client->login_success && client->ssl_proxy != NULL)
ssl_proxy_destroy(client->ssl_proxy);
- if (client->input != NULL)
- i_stream_close(client->input);
- if (client->output != NULL)
- o_stream_close(client->output);
+ i_stream_close(client->input);
+ o_stream_close(client->output);
if (client->master_tag != 0) {
i_assert(client->auth_request == NULL);
io_remove(&conn->io);
i_stream_close(conn->input);
- if (conn->output != NULL)
- o_stream_close(conn->output);
+ o_stream_close(conn->output);
net_disconnect(conn->fd);
conn->fd = -1;