You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yu Qing (JIRA)" <ji...@apache.org> on 2013/10/17 09:27:42 UTC
[jira] [Updated] (TS-2276) manager memory leak in some case
[ https://issues.apache.org/jira/browse/TS-2276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yu Qing updated TS-2276:
------------------------
Assignee: Yu Qing
> manager memory leak in some case
> ---------------------------------
>
> Key: TS-2276
> URL: https://issues.apache.org/jira/browse/TS-2276
> Project: Traffic Server
> Issue Type: Bug
> Components: Management
> Reporter: Yu Qing
> Assignee: Yu Qing
>
> 1. mgmt/utils/MgmtHashTable.h: in function mgmt_hash_table_delete, should free the value when destroy_and_free is true
> 2. mgmt/Alarms.cc: in function signalAlarm, two temp variables malloced for ip and desc should be freed. the code as:
> 350 char *tmp, *tmp2;
> 351 AlarmCallbackFunc func = (AlarmCallbackFunc) ink_hash_table_entry_value(remote_alarms, entry);
> 352 if (ip) {
> 353 tmp = (char *)ats_strdup(ip);
> 354 } else {
> 355 tmp = NULL;
> 356 }
> 357
> 358 if (desc) {
> 359 tmp2 = ats_strdup(desc);
> 360 } else {
> 361 tmp2 = NULL;
> 362 }
> 363 Debug("alarm", "[Alarms::signalAlarm] invoke callback for %d", a);
> 364 (*(func)) (a, tmp, tmp2);
> tmp and tmp2 should be freed after callback.
--
This message was sent by Atlassian JIRA
(v6.1#6144)