Skip to content

Commit

Permalink
lib-http: Fixed potential segfault problem in test-http-client-errors.
Browse files Browse the repository at this point in the history
Found by Coverity.
  • Loading branch information
stephanbosch authored and sirainen committed Nov 9, 2016
1 parent c58821d commit 4d150ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-http/test-http-client-errors.c
Expand Up @@ -1926,8 +1926,10 @@ test_dns_lookup_ttl_input(struct server_connection *conn)
} else {
o_stream_nsend_str(conn->conn.output,
t_strdup_printf("%d\n", EAI_FAIL));
if (count > 4)
if (count > 4) {
server_connection_deinit(&conn);
return;
}
}
count++;
}
Expand Down

0 comments on commit 4d150ce

Please sign in to comment.