mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Added checking of return value from my_once_alloc() in charset
Added checking of return value from malloc() in reg_init() client/mysqltest.c: Added comment dbug/dbug.c: Removed not needed test mysys/charset.c: Added checking of return value from my_once_alloc() regex/reginit.c: Abort if out of memory in reg_init() (unlikely) sql/item_strfunc.cc: Added comment
This commit is contained in:
@ -2302,6 +2302,7 @@ static VAR* var_init(VAR* v, const char* name, int name_len, const char* val,
|
||||
if (!(tmp_var->str_val = my_malloc(val_alloc_len+1, MYF(MY_WME))))
|
||||
die("Out of memory");
|
||||
|
||||
/* 'name' may be NULL here, but in this case name_len is 0 */
|
||||
memcpy(tmp_var->name, name, name_len);
|
||||
if (val)
|
||||
{
|
||||
|
Reference in New Issue
Block a user