fix: fixed the order of the mariadb_free_rpl_event() and rpl_set_error()

calls to avoid using the rpl_even var after freeing it
This commit is contained in:
Pavol Sloboda
2025-04-14 12:44:36 +02:00
committed by Georg Richter
parent 06e041cfa2
commit 5ea5d7ae01

View File

@ -1890,9 +1890,9 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN
/* We need to report an error if this event can't be ignored */
if (!(rpl_event->flags & LOG_EVENT_IGNORABLE_F))
{
mariadb_free_rpl_event(rpl_event);
rpl_set_error(rpl, CR_UNKNOWN_BINLOG_EVENT, 0, RPL_ERR_POS(rpl),
rpl_event->event_type);
mariadb_free_rpl_event(rpl_event);
return 0;
}
return rpl_event;