From: Michael R Sweet Date: Wed, 21 Mar 2018 22:00:02 +0000 (-0400) Subject: Try another fix for Avahi crash (Issue #5268) X-Git-Tag: v2.3b4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0bfbc98b68a8859611ee336b259dd06d5d71100;p=thirdparty%2Fcups.git Try another fix for Avahi crash (Issue #5268) --- diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c index 2ff968d811..ddd3701e07 100644 --- a/scheduler/dirsvc.c +++ b/scheduler/dirsvc.c @@ -1,10 +1,11 @@ /* * Directory services routines for the CUPS scheduler. * - * Copyright 2007-2018 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * Copyright © 2007-2018 by Apple Inc. + * Copyright © 1997-2007 by Easy Software Products, all rights reserved. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ /* @@ -694,18 +695,21 @@ dnssdDeregisterInstance( DNSServiceRefDeallocate(*srv); + *srv = NULL; + # else /* HAVE_AVAHI */ if (!from_callback) avahi_threaded_poll_lock(DNSSDMaster); if (*srv) + { avahi_entry_group_free(*srv); + *srv = NULL; + } if (!from_callback) avahi_threaded_poll_unlock(DNSSDMaster); # endif /* HAVE_DNSSD */ - - *srv = NULL; }