When a fatal error (unaligned memory etc.) is detected, jerasure
should assert(3) instead of exit(3) to give a chance to the calling
program to catch the exception and display a stack trace. Although it is
possible for gdb to display the stack trace and break on exit, libraries
are not usually expected to terminate the calling program in this way.
Signed-off-by: Loic Dachary <loic@dachary.org>
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>
Check matrix for NULL before call talloc().
CID 1093213 (#1 of 1): Resource leak (RESOURCE_LEAK)
4. leaked_storage: Variable "bitmatrix" going out of scope
leaks the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>