Commit 49695d47 authored by Max Kellermann's avatar Max Kellermann

input/curl: relock mutex in error paths

parent 5cec4771
......@@ -955,11 +955,14 @@ CurlInputStream::Seek(InputPlugin::offset_type new_offset, int whence,
/* seek to EOF: simulate empty result; avoid
triggering a "416 Requested Range Not Satisfiable"
response */
mutex.lock();
return true;
}
if (!InitEasy(error))
if (!InitEasy(error)) {
mutex.lock();
return false;
}
/* send the "Range" header */
......@@ -970,8 +973,10 @@ CurlInputStream::Seek(InputPlugin::offset_type new_offset, int whence,
ready = false;
if (!input_curl_easy_add_indirect(this, error))
if (!input_curl_easy_add_indirect(this, error)) {
mutex.lock();
return false;
}
mutex.lock();
WaitReady();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment