memset sockaddr_in before using it. Found by coverity.

This commit is contained in:
Nick Mathewson 2012-07-26 10:38:29 -04:00
parent a2006c0087
commit a1a0e67531

View File

@ -2529,6 +2529,7 @@ evdns_base_nameserver_add(struct evdns_base *base, unsigned long int address)
{
struct sockaddr_in sin;
int res;
memset(&sin, 0, sizeof(sin));
sin.sin_addr.s_addr = address;
sin.sin_port = htons(53);
sin.sin_family = AF_INET;