Also added error logging in cases where memory allocation failed etc.
This commit is contained in:
VilhoRaatikka
2014-11-05 22:04:36 +02:00
parent 0a306b2eeb
commit 665315ea5c
3 changed files with 76 additions and 15 deletions

View File

@ -646,7 +646,13 @@ getUsers(SERVICE *service, USERS *users)
users_data = (char *)calloc(nusers, (users_data_row_len * sizeof(char)) + 1);
if(users_data == NULL) {
if (users_data == NULL) {
LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR,
"Error : Memory allocation for user data failed due to "
"%d, %s.",
errno,
strerror(errno))));
mysql_free_result(result);
mysql_close(con);