avoid uninitialised free of ldns_res

If an invalid rdclass was passed to getrrsetbyname() then
this would execute a free on an uninitialised pointer.
OpenSSH only ever calls this with a fixed and valid rdclass.

Reported by Joshua Rogers
This commit is contained in:
Damien Miller 2014-12-30 08:16:11 +11:00
Родитель 01b6349880
Коммит 462082eacb
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -69,7 +69,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
struct rrsetinfo *rrset = NULL;
struct rdatainfo *rdata;
size_t len;
ldns_resolver *ldns_res;
ldns_resolver *ldns_res = NULL;
ldns_rdf *domain = NULL;
ldns_pkt *pkt = NULL;
ldns_rr_list *rrsigs = NULL, *rrdata = NULL;