From 2f5e769a293248decdb6eb9aeeb10cd430d5ba4d Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 11 Apr 2023 00:05:45 +0300 Subject: [PATCH] Fix a small memory leak caused by bad indexing of EC recovery matrices --- src/osd_rmw.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd_rmw.cpp b/src/osd_rmw.cpp index de090104..8677f108 100644 --- a/src/osd_rmw.cpp +++ b/src/osd_rmw.cpp @@ -142,11 +142,11 @@ inline bool operator < (const reed_sol_erased_t &a, const reed_sol_erased_t &b) for (int i = 0; i < a.size && i < b.size; i++) { if (a.data[i] < b.data[i]) - return -1; + return true; else if (a.data[i] > b.data[i]) - return 1; + return false; } - return 0; + return false; } struct reed_sol_matrix_t