Commit 4add4fc4d84eaa0ff779ac92e5270c08c278b2d9

Authored by Loic Dachary
2 parents ff703215 fa1ea713
Exists in v2

Merge branch 'wip-memory-leak' into 'v2'

jerasure.c: fix memory leak in error case

See merge request !8
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
src/jerasure.c
... ... @@ -274,9 +274,10 @@ int *jerasure_matrix_to_bitmatrix(int k, int m, int w, int *matrix)
274 274 int *bitmatrix;
275 275 int rowelts, rowindex, colindex, elt, i, j, l, x;
276 276  
277   - bitmatrix = talloc(int, k*m*w*w);
278 277 if (matrix == NULL) { return NULL; }
279 278  
  279 + bitmatrix = talloc(int, k*m*w*w);
  280 +
280 281 rowelts = k * w;
281 282 rowindex = 0;
282 283  
... ...