summaryrefslogtreecommitdiff
path: root/mysys/my_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_error.c')
-rw-r--r--mysys/my_error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysys/my_error.c b/mysys/my_error.c
index 0c18bbf6e8b..d7177e7a047 100644
--- a/mysys/my_error.c
+++ b/mysys/my_error.c
@@ -189,7 +189,10 @@ int my_error_register(const char **errmsgs, int first, int last)
/* Error numbers must be unique. No overlapping is allowed. */
if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last))
+ {
+ my_free((gptr)meh_p, MYF(0));
return 1;
+ }
/* Insert header into the chain. */
meh_p->meh_next= *search_meh_pp;