summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorStinson Linden <stinson@lindenlab.com>2014-04-23 17:57:23 +0100
committerStinson Linden <stinson@lindenlab.com>2014-04-23 17:57:23 +0100
commit5e225213f6bdb7b4ca97abfef99b2249a1f88638 (patch)
tree06ca57dfa9d5a02bf40e819e4d05a122652fe7bf /indra/llmessage
parent041f267d6a5a4c6251a113accdf0003301beb6a9 (diff)
MAINT-4009: Adding an ares cleanup call to free the allocated memory.
Diffstat (limited to 'indra/llmessage')
-rwxr-xr-xindra/llmessage/llares.cpp9
-rwxr-xr-xindra/llmessage/llares.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp
index 81e28121fd..9f90ae1544 100755
--- a/indra/llmessage/llares.cpp
+++ b/indra/llmessage/llares.cpp
@@ -610,6 +610,15 @@ LLAres *ll_init_ares()
return gAres;
}
+void ll_cleanup_ares()
+{
+ if (gAres != NULL)
+ {
+ delete gAres;
+ gAres = NULL;
+ }
+}
+
LLDnsRecord::LLDnsRecord(LLResType type, const std::string &name,
unsigned ttl)
: LLRefCount(),
diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h
index 800781ee88..0b5d49e322 100755
--- a/indra/llmessage/llares.h
+++ b/indra/llmessage/llares.h
@@ -578,5 +578,6 @@ extern LLAres *gAres;
* thread safe.
*/
extern LLAres *ll_init_ares();
+extern void ll_cleanup_ares();
#endif // LL_LLARES_H