From: Timo Sirainen Date: Thu, 1 Oct 2015 09:34:43 +0000 (+0300) Subject: push-notification: Don't crash at ox driver cleanup if init() hadn't been called. X-Git-Tag: 2.2.19~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e13cdffb51ff975f70f347d143c89c19f46091f;p=thirdparty%2Fdovecot%2Fcore.git push-notification: Don't crash at ox driver cleanup if init() hadn't been called. --- diff --git a/src/plugins/push-notification/push-notification-driver-ox.c b/src/plugins/push-notification/push-notification-driver-ox.c index 13017542c1..b4c30815fe 100644 --- a/src/plugins/push-notification/push-notification-driver-ox.c +++ b/src/plugins/push-notification/push-notification-driver-ox.c @@ -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); } }