Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib/ioloop.h @ 3879:928229f8b3e6 HEAD
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 14 Jan 2006 20:47:20 +0200 |
parents | 55df57c028d4 |
children | fcd4c3281559 |
line wrap: on
line diff
--- a/src/lib/ioloop.h Sat Jan 14 19:23:22 2006 +0200 +++ b/src/lib/ioloop.h Sat Jan 14 20:47:20 2006 +0200 @@ -37,12 +37,14 @@ io_callback_t *callback, void *context); struct io *io_add_notify(const char *path, io_callback_t *callback, void *context); -void io_remove(struct io *io); +/* Remove I/O handler, and set io pointer to NULL. */ +void io_remove(struct io **io); /* Timeout handlers */ struct timeout *timeout_add(unsigned int msecs, timeout_callback_t *callback, void *context); -void timeout_remove(struct timeout *timeout); +/* Remove timeout handler, and set timeout pointer to NULL. */ +void timeout_remove(struct timeout **timeout); void io_loop_run(struct ioloop *ioloop); void io_loop_stop(struct ioloop *ioloop); /* safe to run in signal handler */ @@ -54,6 +56,7 @@ void io_loop_handler_run(struct ioloop *ioloop); struct ioloop *io_loop_create(pool_t pool); -void io_loop_destroy(struct ioloop *ioloop); +/* Destroy I/O loop and set ioloop pointer to NULL. */ +void io_loop_destroy(struct ioloop **ioloop); #endif