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

ASF GitHub Bot commented on DISPATCH-498:
-----------------------------------------

Github user ted-ross commented on a diff in the pull request:

    https://github.com/apache/qpid-dispatch/pull/98#discussion_r79173208
  
    --- Diff: src/connection_manager.c ---
    @@ -486,11 +483,8 @@ void 
qd_connection_manager_delete_listener(qd_dispatch_t *qd, void *impl)
     bool qd_connection_manager_delete_ssl_profile(qd_dispatch_t *qd, void 
*impl)
     {
         qd_config_ssl_profile_t *ssl_profile = (qd_config_ssl_profile_t*) impl;
    -    if(ssl_profile) {
    -        bool freed = qd_config_ssl_profile_free(qd->connection_manager, 
ssl_profile);
    -
    -        return freed;
    -    }
    +    if(ssl_profile)
    --- End diff --
    
    This looks wrong.  Shouldn't it be if (!ssl_profile) ?


> memory leak in _configure_ssl_profile error path
> ------------------------------------------------
>
>                 Key: DISPATCH-498
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-498
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Management Agent
>    Affects Versions: 0.6.1
>            Reporter: Chuck Rolke
>            Assignee: Ganesh Murthy
>             Fix For: 0.7.0
>
>
> As ssl_profile is constructed the CHECK() macro might jump to the error 
> handler. There the ssl_profile is simply freed. Any strings referenced by 
> ssl_profile are orphaned. Call qd_config_ssl_profile_free() instead of simple 
> free().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to