Use delete instead of xfree for gdb_timer

gdb_timer objects are new'ed in create_timer, but xfree'd in
poll_timers.  Use delete instead.

gdb/ChangeLog:

	* event-loop.c (poll_timers): Unallocate timer using delete
	instead of xfree.
This commit is contained in:
Simon Marchi 2017-06-02 23:24:21 +02:00
parent c1fc265720
commit 0e05cf3a61
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
* event-loop.c (poll_timers): Unallocate timer using delete
instead of xfree.
2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
* breakpoint.h (struct breakpoint_ops) <dtor>: Remove.

View File

@ -1270,7 +1270,7 @@ poll_timers (void)
/* Delete the timer before calling the callback, not after, in
case the callback itself decides to try deleting the timer
too. */
xfree (timer_ptr);
delete timer_ptr;
/* Call the procedure associated with that timer. */
(proc) (client_data);