infiniband-diags: saquery, properly free mad when no results are found
PATCH 2/3 infiniband-diags: saquery, properly free mad when no results are found
Subject: [PATCH 2/3] infiniband-diags: saquery, properly free mad when no results are found
Signed-off-by Ira Weiny <[email protected]>
--- src/saquery.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
src/saquery.c +6 -2
@@ -876,11 +876,15 @@ static int get_and_dump_any_records(bind_handle_t h, uint16_t attr_id,if (ret)return ret; -if (result.result_cnt ==0 ) -return ENODEV ; +if (result.result_cnt ==0 ) { + ret =ENODEV ; + goto Exit; + }dump_results (&result, dump_func); +Exit: +return_mad ();return 0 ; }
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html