Commit 17d1d0ee authored by unknown's avatar unknown

Free allocated memory even in case of error.

parent f6f61947
...@@ -301,7 +301,10 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, ...@@ -301,7 +301,10 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
} }
if (!(new_page = (uchar*)my_alloca((uint)keyinfo->block_length))) if (!(new_page = (uchar*)my_alloca((uint)keyinfo->block_length)))
return -1; {
err_code= -1;
goto split_err;
}
stop = task + (max_keys + 1); stop = task + (max_keys + 1);
cur1 = rt_PAGE_FIRST_KEY(page, nod_flag); cur1 = rt_PAGE_FIRST_KEY(page, nod_flag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment