You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/10/31 11:37:17 UTC

[jira] [Commented] (TS-2276) manager memory leak in some case

    [ https://issues.apache.org/jira/browse/TS-2276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13810101#comment-13810101 ] 

ASF subversion and git services commented on TS-2276:
-----------------------------------------------------

Commit 316b450415f41cf80dca05f18538aa27c53b7b51 in branch refs/heads/master from [~happy_fish100]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=316b450 ]

TS-2276: manager memory leak in some case


> 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
>             Fix For: 4.1.0
>
>         Attachments: 0001-TS-2276-manager-memory-leak-in-some-case.patch
>
>
> 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:
> {code}
> 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);
> {code}
> tmp and tmp2 should be freed after callback.



--
This message was sent by Atlassian JIRA
(v6.1#6144)