jerasure.c: add check for result of malloc()
Add check for bitmatrix and return NULL if malloc failed. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>master
parent
b14af86424
commit
31810e1fdc
|
@ -276,6 +276,7 @@ int *jerasure_matrix_to_bitmatrix(int k, int m, int w, int *matrix)
|
|||
if (matrix == NULL) { return NULL; }
|
||||
|
||||
bitmatrix = talloc(int, k*m*w*w);
|
||||
if (!bitmatrix) return NULL;
|
||||
|
||||
rowelts = k * w;
|
||||
rowindex = 0;
|
||||
|
|
Loading…
Reference in New Issue