mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
Cygwin: resolver: A few fixes for cygwin_query(), part 2
Make sure Windows ResultSet is free'd when dn_comp failed internally
This commit is contained in:
parent
54f0590a66
commit
099d5a9a57
@ -246,8 +246,7 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
|
||||
statp->res_h_errno = NO_RECOVERY;
|
||||
break;
|
||||
}
|
||||
len = -1;
|
||||
goto done;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr = AnsPtr + HFIXEDSZ; /* Skip header */
|
||||
@ -293,10 +292,12 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
|
||||
rr = rr->pNext;
|
||||
}
|
||||
|
||||
len = ptr - AnsPtr;
|
||||
|
||||
done:
|
||||
|
||||
DnsFree(pQueryResultsSet, DnsFreeRecordList);
|
||||
|
||||
len = ptr - AnsPtr;
|
||||
done:
|
||||
if (HFIXEDSZ <= AnsLength) {
|
||||
ptr = AnsPtr;
|
||||
PUTSHORT(Id, ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user