]> git.proxmox.com Git - mirror_qemu.git/commit - block/curl.c
block/curl.c: Check error return from curl_easy_setopt()
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Feb 2022 15:23:41 +0000 (15:23 +0000)
committerHanna Reitz <hreitz@redhat.com>
Mon, 7 Mar 2022 08:19:20 +0000 (09:19 +0100)
commitb0ea6c98fa2431b9e24b3a53b8b42c960ccf3dba
tree6dfeeafc8a3b8dcf14601b8e207205f7cf290588
parent2ea7dfcd05bad3b81d63eaac50bf1fc78636de5b
block/curl.c: Check error return from curl_easy_setopt()

Coverity points out that we aren't checking the return value
from curl_easy_setopt() for any of the calls to it we make
in block/curl.c.

Some of these options are documented as always succeeding (e.g.
CURLOPT_VERBOSE) but others have documented failure cases (e.g.
CURLOPT_URL).  For consistency we check every call, even the ones
that theoretically cannot fail.

Fixes: Coverity CID 1459336, 1459482, 1460331
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220222152341.850419-3-peter.maydell@linaro.org>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/curl.c