dovecot-2.2: push-notification: Don't crash at ox driver cleanup...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 1 09:36:12 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/a67e667f38a9
changeset: 19265:a67e667f38a9
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 01 12:34:43 2015 +0300
description:
push-notification: Don't crash at ox driver cleanup if init() hadn't been called.

diffstat:

 src/plugins/push-notification/push-notification-driver-ox.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r e309b27f02ea -r a67e667f38a9 src/plugins/push-notification/push-notification-driver-ox.c
--- a/src/plugins/push-notification/push-notification-driver-ox.c	Wed Sep 30 18:22:52 2015 -0600
+++ b/src/plugins/push-notification/push-notification-driver-ox.c	Thu Oct 01 12:34:43 2015 +0300
@@ -334,8 +334,10 @@
 static void push_notification_driver_ox_cleanup(void)
 {
     if ((ox_global != NULL) && (ox_global->refcount <= 0)) {
-        http_client_wait(ox_global->http_client);
-        http_client_deinit(&ox_global->http_client);
+        if (ox_global->http_client != NULL) {
+            http_client_wait(ox_global->http_client);
+            http_client_deinit(&ox_global->http_client);
+        }
         i_free_and_null(ox_global);
     }
 }


More information about the dovecot-cvs mailing list