Hi Aaron,

Thanks very much for the eyes on the code. Could you please enter this
problem as a jira (https://issues.apache.org/jira/browse/qpid) and
attach your patch to the jira? Please be sure to check the box "Grant
license to ASF for inclusion in ASF works" to ensure yor patch can be
used.

-Steve

> -----Original Message-----
> From: Aaron Fabbri [mailto:[email protected]] 
> Sent: Tuesday, October 05, 2010 10:15 PM
> To: [email protected]
> Subject: Re: patch: Don't access after delete in RdmaServer.cpp
> 
> 
> Actually, use this patch.. it fixes an additional use-after-free.
> 
> 
> Index: RdmaServer.cpp 
> ===================================================================
> --- RdmaServer.cpp      (revision 1004875)
> +++ RdmaServer.cpp      (working copy)
> @@ -118,18 +118,18 @@
>      ConRec* cr = ci->getContext<ConRec>();
>      cr->connection->disconnect();
>      cr->data->drainWriteQueue(drained);
> +    cout << "Disconnected: " << cr << "\n";
>      delete cr;
> -    cout << "Disconnected: " << cr << "\n";
>  }
> 
>  void connectionError(Rdma::Connection::intrusive_ptr& ci, 
> Rdma::ErrorType) {
>      ConRec* cr = ci->getContext<ConRec>();
> -    cr->connection->disconnect();
>      if (cr) {
> -        cr->data->drainWriteQueue(drained);
> -        delete cr;
> +       cr->connection->disconnect();
> +       cr->data->drainWriteQueue(drained);
> +       cout << "Connection error: " << cr << "\n";
> +       delete cr;
>      }
> -    cout << "Connection error: " << cr << "\n";
>  }
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:[email protected]
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to