vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Feb 24 15:34:32 2019 +0200| [52dbddf4073b46a098f7fbc0f83a9e4c5873280d] | committer: Rémi Denis-Courmont
messages: fix infinite loop on error The early logger was draining into itself, ad vitam. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52dbddf4073b46a098f7fbc0f83a9e4c5873280d --- src/misc/messages.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/misc/messages.c b/src/misc/messages.c index c184b9c6fe..89609e402d 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -315,9 +315,12 @@ static void vlc_vaLogSwitch(void *d, int type, const vlc_log_t *item, static void vlc_LogSwitchClose(void *d) { struct vlc_logger_switch *logswitch = d; + struct vlc_logger backend = logswitch->backend; - if (logswitch->backend.ops->destroy != NULL) - logswitch->backend.ops->destroy(logswitch->backend.sys); + logswitch->backend.ops = &discard_ops; + + if (backend.ops->destroy != NULL) + backend.ops->destroy(backend.sys); vlc_rwlock_destroy(&logswitch->lock); free(logswitch); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
