jerasure.c: fix memory leak in error case

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>
Examples/reed_sol_time_gf.c: include sys/time.h

Fix warning: implicit declaration of function 'gettimeofday' is
invalid in C99 [-Wimplicit-function-declaration]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Examples/*coder.c: add missing include of unistd.h

Fix warning: implicit declaration of function 'getcwd' is invalid in
C99 [-Wimplicit-function-declaration]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
jerasure.c: free memory before return in error case

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>
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>
jerasure.c: add more checks for talloc/malloc results

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merged in dalgaaf/jerasure/wip-da-coverity-rebase (pull request #21)

[UPDATED][Rebased #8] Fixes for SCA issues
add galois_init_default_field error code

galois_init_default_field returns an errno(3) code in case of error
instead of exiting. This is handy when the caller needs to perform
cleanup or error reporting when an error occurs instead of exit(2).

The exit(2) based error handling is preserved in the static
galois_init() function which is used in galois.c instead and is based on
galois_init_default_field to avoid code duplication.

Signed-off-by: Loic Dachary <loic@dachary.org>
Merged in dachary/jerasure/wip-galois-init (pull request #22)

add galois_init_default_field error code
Removed PDF from the repo and added a note in the README that describes how to
get the manual.
Adding option to disable SSE support in configure
define galois_uninit_field

To free resources allocated by galois_init_default_field.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
remove unused variable in tests

Signed-off-by: Loic Dachary <loic-201408@dachary.org>