[
https://issues.apache.org/jira/browse/TS-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14197110#comment-14197110
]
Brian Geffon commented on TS-1432:
----------------------------------
Untested but this is all we should need:
{code}
diff --git a/proxy/InkIOCoreAPI.cc b/proxy/InkIOCoreAPI.cc
index 26f3298..091d7a2 100644
--- a/proxy/InkIOCoreAPI.cc
+++ b/proxy/InkIOCoreAPI.cc
@@ -189,6 +189,11 @@ TSMutexCreate()
return (TSMutex)mutexp;
}
+void
+TSMutexDestroy(TSMutex m) {
+ ((ProxyMutex *)m)->free();
+}
+
/* The following two APIs are for Into work, actually, APIs of Mutex
should allow plugins to manually increase or decrease the refcount
of the mutex pointer, plugins may want more control of the creation
diff --git a/proxy/api/ts/ts.h b/proxy/api/ts/ts.h
index 3a6eed6..07a8760 100644
--- a/proxy/api/ts/ts.h
+++ b/proxy/api/ts/ts.h
@@ -1129,6 +1129,7 @@ extern "C"
/* --------------------------------------------------------------------------
Mutexes */
tsapi TSMutex TSMutexCreate(void);
+ tsapi void TSMutexDestroy(TSMutex mutexp);
tsapi void TSMutexLock(TSMutex mutexp);
tsapi TSReturnCode TSMutexLockTry(TSMutex mutexp);
{code}
> API is missing TSMutexDestroy
> -----------------------------
>
> Key: TS-1432
> URL: https://issues.apache.org/jira/browse/TS-1432
> Project: Traffic Server
> Issue Type: Improvement
> Components: TS API
> Affects Versions: 3.3.4
> Reporter: Brian Geffon
> Assignee: Meera Mosale Nataraja
> Fix For: 5.3.0
>
>
> pthread_mutex_destory on a TSMutex would cause a leak, this API is really
> necessary.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)