changeset 22100:4484220b090c

push-notification: Fix crash in OX driver's deinit The http_client doesn't always exist.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 05 Jun 2017 19:05:58 +0300
parents cb967fd0910c
children dbb9b7c9ca9f
files src/plugins/push-notification/push-notification-driver-ox.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/push-notification/push-notification-driver-ox.c	Mon Jun 05 12:14:57 2017 +0300
+++ b/src/plugins/push-notification/push-notification-driver-ox.c	Mon Jun 05 19:05:58 2017 +0300
@@ -422,7 +422,8 @@
 
     i_free(dconfig->cached_ox_metadata);
     if (ox_global != NULL) {
-        http_client_wait(ox_global->http_client);
+        if (ox_global->http_client != NULL)
+            http_client_wait(ox_global->http_client);
         i_assert(ox_global->refcount > 0);
         --ox_global->refcount;
     }