Revert "[hardening] avoid accessing potentially uninitialized memory"

This reverts commit 7adbc8371f.
This commit is contained in:
Konstantin Käfer
2014-06-01 22:05:18 +02:00
parent 7609736767
commit b548c048bf

View File

@@ -190,7 +190,7 @@ void curl_perform(uv_poll_t *req, int /*status*/, int events) {
}
int handle_socket(CURL * /*easy*/, curl_socket_t s, int action, void * /*userp*/, void *socketp) {
curl_context *context = nullptr;
curl_context *context;
if (action == CURL_POLL_IN || action == CURL_POLL_OUT) {
if (socketp) {
context = (curl_context *)socketp;
@@ -199,9 +199,6 @@ int handle_socket(CURL * /*easy*/, curl_socket_t s, int action, void * /*userp*/
}
curl_multi_assign(curl_multi, s, (void *)context);
}
if (!context) {
throw std::runtime_error("unhandled action in socket handling");
}
switch (action) {
case CURL_POLL_IN: