Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=86dfbecdea733a6e940b958e94a85af45b89a0b9
Commit:     86dfbecdea733a6e940b958e94a85af45b89a0b9
Parent:     445d68070c9c02acdda38e6d69bd43096f521035
Author:     Hal Rosenstock <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 3 10:45:17 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Aug 3 10:45:17 2007 -0700

    IB/mad: Fix memory leak in switch handling in ib_mad_recv_done_handler()
    
    If agent_send_response() returns an error, we shouldn't do anything
    differently than if it succeeds; setting response to NULL just means
    that the response buffer gets leaked.
    
    Signed-off-by: Suresh Shelvapille <[EMAIL PROTECTED]>
    Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/core/mad.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 9697857..6f42877 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -1916,12 +1916,11 @@ static void ib_mad_recv_done_handler(struct 
ib_mad_port_private *port_priv,
                        response->header.recv_wc.recv_buf.mad = 
&response->mad.mad;
                        response->header.recv_wc.recv_buf.grh = &response->grh;
 
-                       if (!agent_send_response(&response->mad.mad,
-                                                &response->grh, wc,
-                                                port_priv->device,
-                                                
smi_get_fwd_port(&recv->mad.smp),
-                                                qp_info->qp->qp_num))
-                               response = NULL;
+                       agent_send_response(&response->mad.mad,
+                                           &response->grh, wc,
+                                           port_priv->device,
+                                           smi_get_fwd_port(&recv->mad.smp),
+                                           qp_info->qp->qp_num);
 
                        goto out;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to