From cbe79a5d6d331213db009800cd3f68a234d3b9d7 Mon Sep 17 00:00:00 2001 From: Sergey Oblomov Date: Thu, 18 Mar 2021 11:37:30 +0200 Subject: [PATCH] LIBPERF: fixed incorrect error handling - there was issue in potential incorrect free on error handling: in case if memory could not be allocated incorrect free operation may be called (cherry picked from commit e7894da3bd2ecfb68f91becec62b005e5edbd0c5) --- src/tools/perf/lib/libperf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/perf/lib/libperf.c b/src/tools/perf/lib/libperf.c index c97440707b8..507966c420f 100644 --- a/src/tools/perf/lib/libperf.c +++ b/src/tools/perf/lib/libperf.c @@ -167,7 +167,6 @@ uct_perf_test_alloc_host(const ucx_perf_context_t *perf, size_t length, status = uct_iface_mem_alloc(perf->uct.iface, length, flags, "perftest", alloc_mem); if (status != UCS_OK) { - ucs_free(alloc_mem); ucs_error("failed to allocate memory: %s", ucs_status_string(status)); return status; }