summaryrefslogtreecommitdiff
path: root/myisam/rt_split.c
diff options
context:
space:
mode:
authorram@mysql.r18.ru <>2003-03-28 18:18:25 +0400
committerram@mysql.r18.ru <>2003-03-28 18:18:25 +0400
commitdf7c02d8d0864318a0a842049a60056c7c5e0c08 (patch)
treecfd625c1469b64cb1d01d3a6715f5668986ee280 /myisam/rt_split.c
parentaa19b26c7bfdd2a3e48dabed687325abb27e03b7 (diff)
downloadmariadb-git-df7c02d8d0864318a0a842049a60056c7c5e0c08.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);