From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um58z-0001Ea-Jn for qemu-devel@nongnu.org; Mon, 10 Jun 2013 12:40:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Um58u-0003cX-OV for qemu-devel@nongnu.org; Mon, 10 Jun 2013 12:40:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um58u-0003cP-HN for qemu-devel@nongnu.org; Mon, 10 Jun 2013 12:40:28 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5AGeReo002531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Jun 2013 12:40:27 -0400 From: "Richard W.M. Jones" Date: Mon, 10 Jun 2013 17:40:15 +0100 Message-Id: <1370882415-15463-1-git-send-email-rjones@redhat.com> Subject: [Qemu-devel] [PATCH v2] curl: Don't set curl options on the handle just before it's going to be deleted. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com From: "Richard W.M. Jones" (Found by Kamil Dudka) Signed-off-by: Richard W.M. Jones Cc: Michael Tokarev --- block/curl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index b634ccf..8d0d45d 100644 --- a/block/curl.c +++ b/block/curl.c @@ -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) -- 1.8.2.1