Skip to content

Commit

Permalink
[CBRD-24422] When an error occurs in update_class(), it is not initia…
Browse files Browse the repository at this point in the history
…lized to NULL after classobj_free_template() is executed, so core occurs later. (#3711) (#3854)

http://jira.cubrid.org/browse/CBRD-24422

backport #3711
  • Loading branch information
youngjinj authored Oct 13, 2022
1 parent 9750d40 commit f964283
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/object/schema_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -12844,6 +12844,13 @@ update_class (SM_TEMPLATE * template_, MOP * classmop, int auto_res, DB_AUTH aut
assert (error != ER_HEAP_NODATA_NEWADDRESS); /* TODO - */

classobj_free_template (flat);

/* don't touch this class if we aborted ! */
if (class_ != NULL && error != ER_LK_UNILATERALLY_ABORTED)
{
class_->new_ = NULL;
}

abort_subclasses (newsubs);

if (error != ER_TM_SERVER_DOWN_UNILATERALLY_ABORTED && error != ER_LK_UNILATERALLY_ABORTED)
Expand Down

0 comments on commit f964283

Please sign in to comment.