Skip to contentSkip to conversation

curl: Don't set curl options on the handle just before it's going to be deleted.

PATCH Applied Richard W.M. Jones 3 participants 3 messages Jun 10, 2013 – Jun 11, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 curl: Don't set curl options on the handle just before it's going to be deleted.

From: "Richard W.M. Jones" <[email protected]>

(Found by Kamil Dudka)

---
 block/curl.c | 2 --
 1 file changed, 2 deletions(-)
block/curl.c +0 -2
index b634ccf..8d0d45d 100644
@@ -452,8 +452,6 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags)
     if (curl_easy_perform(state->curl))
         goto out;
     curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d);
-    curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb);
-    curl_easy_setopt(state->curl, CURLOPT_NOBODY, 0);
     if (d)
         s->len = (size_t)d;
     else if(!s->len)
Signature · 1 line
1.8.2.1