summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-01 22:05:18 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-01 22:05:18 +0200
commitb548c048bfa06a6668ee1b270d1848e76f07c480 (patch)
tree61b376a3be89db8ac3edfd538ea6c47b80bcad7e /common
parent76097367670ed569572168b83eea8594c2600b6d (diff)
downloadqtlocation-mapboxgl-b548c048bfa06a6668ee1b270d1848e76f07c480.tar.gz
Revert "[hardening] avoid accessing potentially uninitialized memory"
This reverts commit 7adbc8371f9dbac7ac19b12f7690d6707d688427.
Diffstat (limited to 'common')
-rw-r--r--common/curl_request.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/common/curl_request.cpp b/common/curl_request.cpp
index 40d94b9569..7eae7fd95e 100644
--- a/common/curl_request.cpp
+++ b/common/curl_request.cpp
@@ -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: