BUILD: http-client: Avoid dead code when compiled without SSL support
When an HTTP client is started on an HAProxy compiled without the SSL support, an error is triggered when HTTPS is used. In this case, the freshly created conn-stream is released. But this code is specific to the non-SSL part. Thus it is moved the in right #if/#else section. This patch should fix the issue #1655.
This commit is contained in:
parent
ae660be547
commit
67df95a8a2
|
@ -519,7 +519,11 @@ struct appctx *httpclient_start(struct httpclient *hc)
|
|||
s->target = &httpclient_srv_ssl->obj_type;
|
||||
#else
|
||||
ha_alert("httpclient: OpenSSL is not available %s:%d.\n", __FUNCTION__, __LINE__);
|
||||
goto out_free_stream;
|
||||
cs_detach_app(cs);
|
||||
LIST_DELETE(&s->list);
|
||||
pool_free(pool_head_stream, s);
|
||||
cs_free(cs);
|
||||
goto out_free_addr;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -544,11 +548,6 @@ struct appctx *httpclient_start(struct httpclient *hc)
|
|||
|
||||
return appctx;
|
||||
|
||||
out_free_stream:
|
||||
cs_detach_app(cs);
|
||||
LIST_DELETE(&s->list);
|
||||
pool_free(pool_head_stream, s);
|
||||
cs_free(cs);
|
||||
out_free_addr:
|
||||
sockaddr_free(&addr);
|
||||
out_free_sess:
|
||||
|
|
Loading…
Reference in New Issue