curl/types.h was removed in cURL 7.21.7 (https://github.com/bagder/curl/compare/curl-7_21_6...curl-7_21_7).
Fixed a possible double-close, which has undefined behaviour.