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:
parent
c1fc265720
commit
0e05cf3a61
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user