mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-16 17:15:01 +00:00
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:

committed by
Georg Richter

parent
06e041cfa2
commit
5ea5d7ae01
@ -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;
|
||||
|
Reference in New Issue
Block a user