[MLX4] fix memory leakage in error flow. [mlnx: 4276]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 May 2009 12:50:07 +0000 (12:50 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 May 2009 12:50:07 +0000 (12:50 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2145 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/hca/mcast.c

index 49c70b9..7ae1f8a 100644 (file)
@@ -174,10 +174,10 @@ mlnx_detach_mcast (
                goto err_detach_mcast;\r
        }\r
 \r
-       kfree(p_mcast);\r
        status = IB_SUCCESS;\r
 \r
 err_detach_mcast:\r
+       kfree(p_mcast);\r
 err_unsupported:       \r
 err_invalid_param:\r
        if (status != IB_SUCCESS) \r