summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
Diffstat (limited to 'mysys')
-rw-r--r--mysys/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/string.c b/mysys/string.c
index 42fe83ed4e1..cc73d18c601 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -208,7 +208,8 @@ my_bool dynstr_append_quoted(DYNAMIC_STRING *str,
void dynstr_free(DYNAMIC_STRING *str)
{
- my_free(str->str);
+ if (str->str) /* Safety to allow double free */
+ my_free(str->str);
str->str= NULL;
}