The original code in block/curl.c dereferences state *after* checking that it is NULL. That's obviously wrong, and indeed I can easily provoke a segfault when talking to a VMware vCenter server.
I'm not as sure that this fix is the correct one, so please review it carefully. However it does at least fix the above segfault. Rich.