1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

fix some leaks torture tests detected 2011-08-30

This commit is contained in:
Yang Tse 2011-08-31 03:50:07 +02:00
parent c06de20025
commit d20408e816

View File

@ -999,8 +999,10 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd],
sa->sa_family == AF_INET?1:2, sa->sa_family == AF_INET?1:2,
myhost, port); myhost, port);
if(result) if(result) {
Curl_closesocket(conn, portsock);
return result; return result;
}
break; break;
} }
else if(PORT == fcmd) { else if(PORT == fcmd) {
@ -1020,8 +1022,10 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff));
result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp);
if(result) if(result) {
Curl_closesocket(conn, portsock);
return result; return result;
}
break; break;
} }
} }