mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Fix lookup_hostname BIF (and memory leak in it).
The problem was caused by uninitialized is_text member in AsyncRequest.
This commit is contained in:
parent
dae9c946b6
commit
89500c9176
2 changed files with 2 additions and 1 deletions
|
@ -1012,7 +1012,6 @@ void DNS_Mgr::AsyncLookupAddr(const IPAddr& host, LookupCallback* callback)
|
||||||
// A new one.
|
// A new one.
|
||||||
req = new AsyncRequest;
|
req = new AsyncRequest;
|
||||||
req->host = host;
|
req->host = host;
|
||||||
req->is_txt = false;
|
|
||||||
asyncs_queued.push_back(req);
|
asyncs_queued.push_back(req);
|
||||||
asyncs_addrs.insert(AsyncRequestAddrMap::value_type(host, req));
|
asyncs_addrs.insert(AsyncRequestAddrMap::value_type(host, req));
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,8 @@ protected:
|
||||||
bool is_txt;
|
bool is_txt;
|
||||||
CallbackList callbacks;
|
CallbackList callbacks;
|
||||||
|
|
||||||
|
AsyncRequest() : time(0.0), is_txt(false) { }
|
||||||
|
|
||||||
bool IsAddrReq() const { return name.length() == 0; }
|
bool IsAddrReq() const { return name.length() == 0; }
|
||||||
|
|
||||||
void Resolved(const char* name)
|
void Resolved(const char* name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue