Memory leak fix

Need to free parent in mdb_sql_free_tree