aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/curl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/curl.c b/block/curl.c
index 6a6cd72975..9516852971 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -759,6 +759,8 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
// Get file size
if (curl_init_state(s, state) < 0) {
+ pstrcpy(state->errmsg, CURL_ERROR_SIZE,
+ "curl library initialization failed.");
goto out;
}