Fix for Coverity issue from Ceph project:
CID
1093211 (#1 of 1): Resource leak (RESOURCE_LEAK)
20. leaked_storage: Variable "ind_to_row" going out of scope leaks
the storage it points to.
CID
1093212 (#1 of 1): Resource leak (RESOURCE_LEAK)
20. leaked_storage: Variable "row_ids" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
row_ids = talloc(int, k+m);
ind_to_row = talloc(int, k+m);
- if (set_up_ids_for_scheduled_decoding(k, m, erasures, row_ids, ind_to_row) < 0) return NULL;
+ if (set_up_ids_for_scheduled_decoding(k, m, erasures, row_ids, ind_to_row) < 0) {
+ free(row_ids);
+ free(ind_to_row);
+ return NULL;
+ }
/* Now, we're going to create one decoding matrix which is going to
decode everything with one call. The hope is that the scheduler