From b3782376f4df5e8b35124730dd9bfd370a0bf61d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 19 Jan 2016 16:15:12 +1100 Subject: [PATCH] Free creation_ctx in sp_load_for_information_schema where create_string fails cppcheck --force -DDBUG_VOID_RETURN=return -"DDBUG_RETURN(a)=return a" sql/sp.cc [sql/sp.cc:2282]: (error) Memory leak: creation_ctx --- sql/sp.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/sp.cc b/sql/sp.cc index a514ca1..1452ca4 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -2279,7 +2279,10 @@ sp_load_for_information_schema(THD *thd, TABLE *proc_table, String *db, returns, strlen(returns), sp_body, strlen(sp_body), &sp_chistics, &definer_user, &definer_host, sql_mode)) + { + delete creation_ctx; return 0; + } thd->lex= &newlex; newlex.current_select= NULL;