check return values of strdup and malloc
add talloc0 function (malloc and zero fill)
check return values of arithmetic openssl BN_* functions
check return values of BN_bin2bn function
remove useless BN_init calls right after BN_new
fix 2 small memory leaks
close /etc/passwd file handle right after evaluating home directory
fix small memory leak in running_for_first_time (local variable config_directory)
add length modifier to the format for strings in sprintf call
replace sprintf call with snprintf for downloaded part name