summaryrefslogtreecommitdiff
path: root/myisam/rt_split.c
diff options
context:
space:
mode:
authorunknown <ram@mysql.r18.ru>2003-03-28 18:18:25 +0400
committerunknown <ram@mysql.r18.ru>2003-03-28 18:18:25 +0400
commit17d1d0ee085476c43188b4697398463404da683f (patch)
treecfd625c1469b64cb1d01d3a6715f5668986ee280 /myisam/rt_split.c
parentf6f61947baef2b18b603cedafed10807c6cf43ba (diff)
downloadmariadb-git-17d1d0ee085476c43188b4697398463404da683f.tar.gz
Free allocated memory even in case of error.
Diffstat (limited to 'myisam/rt_split.c')
-rw-r--r--myisam/rt_split.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/myisam/rt_split.c b/myisam/rt_split.c
index 2690e4beac1..879cc0dc1dd 100644
--- a/myisam/rt_split.c
+++ b/myisam/rt_split.c
@@ -301,8 +301,11 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
}
if (!(new_page = (uchar*)my_alloca((uint)keyinfo->block_length)))
- return -1;
-
+ {
+ err_code= -1;
+ goto split_err;
+ }
+
stop = task + (max_keys + 1);
cur1 = rt_PAGE_FIRST_KEY(page, nod_flag);
cur2 = rt_PAGE_FIRST_KEY(new_page, nod_flag);