author | Sebastian Harl <sh@tokkee.org> | |
Sun, 20 May 2007 20:59:21 +0000 (22:59 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 21 May 2007 05:17:48 +0000 (07:17 +0200) | ||
commit | deb839e18f64fedaa8e789ee6bd8619de957ea65 | |
tree | 36ab1232474e35f6fe733f5ec761759b08b18dc5 | tree | snapshot |
parent | 402f6df1e035c588f809eb4a85650c5ef3e4d082 | commit | diff |
plugin.c: Advance the llentry_t pointer before calling the shutdown callback.
> Important note: Unregistering the shutdown callback during shutdown is
> somewhat tricky. Doing that frees the llist_t entry in plugin.c:list_shutdown.
> This might cause a segfault in plugin_shutdown_all () when it tries to access
> the next pointer of that entry. If plugin_unregister_shutdown () is the last
> statement before the return from the shutdown callback this should be save in
> about 99% of all cases. Still there should be some better way to handle this.
This is an imho nice way to fix it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
> Important note: Unregistering the shutdown callback during shutdown is
> somewhat tricky. Doing that frees the llist_t entry in plugin.c:list_shutdown.
> This might cause a segfault in plugin_shutdown_all () when it tries to access
> the next pointer of that entry. If plugin_unregister_shutdown () is the last
> statement before the return from the shutdown callback this should be save in
> about 99% of all cases. Still there should be some better way to handle this.
This is an imho nice way to fix it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/plugin.c | diff | blob | history |