summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-03-21 18:00:02 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-03-21 18:00:02 -0400
commitd0bfbc98b68a8859611ee336b259dd06d5d71100 (patch)
tree16fbffce0b2c7d024db2fa318383b08359a25fb8 /scheduler
parent561e0647a8494eda6ce73176b5f02153003a80c4 (diff)
downloadcups-d0bfbc98b68a8859611ee336b259dd06d5d71100.tar.gz
Try another fix for Avahi crash (Issue #5268)
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/dirsvc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
index 2ff968d81..ddd3701e0 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;
}