diff options
author | unknown <ram@mysql.r18.ru> | 2003-03-28 18:18:24 +0400 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-03-28 18:18:24 +0400 |
commit | f6f61947baef2b18b603cedafed10807c6cf43ba (patch) | |
tree | b55da030c50efece26f9d5b949a24dcc76e8647e /myisam | |
parent | 6a11159509ccd86bf8f1a0ff388e3503270b9e51 (diff) | |
download | mariadb-git-f6f61947baef2b18b603cedafed10807c6cf43ba.tar.gz |
Bug fix: should check _mi_new() return value.
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/rt_split.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/myisam/rt_split.c b/myisam/rt_split.c index 3bababca368..2690e4beac1 100644 --- a/myisam/rt_split.c +++ b/myisam/rt_split.c @@ -330,8 +330,11 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, mi_putint(page, 2 + n1 * full_length, nod_flag); mi_putint(new_page, 2 + n2 * full_length, nod_flag); - *new_page_offs=_mi_new(info, keyinfo); - err_code= _mi_write_keypage(info, keyinfo, *new_page_offs, new_page); + if ((*new_page_offs= _mi_new(info, keyinfo)) == HA_OFFSET_ERROR) + err_code= -1; + else + err_code= _mi_write_keypage(info, keyinfo, *new_page_offs, new_page); + my_afree((byte*)new_page); split_err: |