]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
push-notification: Don't crash at ox driver cleanup if init() hadn't been called.
authorTimo Sirainen <tss@iki.fi>
Thu, 1 Oct 2015 09:34:43 +0000 (12:34 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 1 Oct 2015 09:34:43 +0000 (12:34 +0300)
src/plugins/push-notification/push-notification-driver-ox.c

index 13017542c1c0cf1e82db3e8b2d5199760200e3c5..b4c30815feb29c72ae3db0bdcf3ebbad87bf310e 100644 (file)
@@ -334,8 +334,10 @@ static void push_notification_driver_ox_deinit
 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);
     }
 }