fetch/common.c: fix a memleak found by clang-analyzer.
This commit is contained in:
		@@ -640,8 +640,10 @@ fetch_ssl_get_numeric_addrinfo(const char *hostname, size_t len)
 | 
			
		||||
	hints.ai_protocol = 0;
 | 
			
		||||
	hints.ai_flags = AI_NUMERICHOST;
 | 
			
		||||
	/* port is not relevant for this purpose */
 | 
			
		||||
	if (getaddrinfo(host, "443", &hints, &res) != 0)
 | 
			
		||||
	if (getaddrinfo(host, "443", &hints, &res) != 0) {
 | 
			
		||||
		free(host);
 | 
			
		||||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
	free(host);
 | 
			
		||||
	return res;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user