--- mgmapi.cpp.orig 2015-06-14 11:38:35.000000000 -0700 +++ mgmapi.cpp 2015-06-14 11:42:12.000000000 -0700 @@ -2578,6 +2578,12 @@ break; void *tmp_data = malloc(base64_needed_decoded_length((size_t) (len - 1))); + if(!tmp_data) + { + SET_ERROR(handle, ENOMEM, + "Allocating ndb_mgm_events struct"); + DBUG_RETURN(NULL); + } const int res = ndb_base64_decode(buf64, len-1, tmp_data, NULL); delete[] buf64; UtilBuffer tmp;