if(ret!=0)return ret;
ret = srvGetServiceHandle(&context->servhandle, "http:C");
- if(ret!=0)return ret;
+ if(ret!=0) {
+ HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
+ return ret;
+ }
ret = HTTPC_InitializeConnectionSession(context->servhandle, context->httphandle);
if(ret!=0) {
+ HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
svcCloseHandle(context->servhandle);
return ret;
}
ret = HTTPC_SetProxyDefault(context->servhandle, context->httphandle);
if(ret!=0) {
+ HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
svcCloseHandle(context->servhandle);
return ret;
}
{
Result ret=0;
- ret = HTTPC_CloseContext(__httpc_servhandle, context->httphandle);
+ ret = HTTPC_CloseContext(context->servhandle, context->httphandle);
svcCloseHandle(context->servhandle);
return ret;