From 42c2a2cb50aa3676efc4d5cd903efcf59702e83a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Nov 2006 17:09:16 +1100 Subject: [PATCH] fix runtime warning of freeing null ptr sql/sql_show.cc: fix warning during mysql-test-run of freeing null pointer --- sql/sql_show.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 15a1eaaaef5..34f022d9478 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3979,10 +3979,12 @@ static void store_schema_partitions_record(THD *thd, TABLE *schema_table, { char *ts= showing_table->file->get_tablespace_name(thd); if(ts) + { table->field[24]->store(ts, strlen(ts), cs); + my_free(ts, MYF(0)); + } else table->field[24]->set_null(); - my_free(ts, MYF(0)); } } return;