summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-02-13 00:42:23 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-02-13 00:42:23 -0500
commitc38eddfc29cd90ab312d912a63d89b0d74bd2a22 (patch)
tree73f1f5e720dcf3b3349c0536b7540af02d59a197
parentb1a9f335c668343d35f03e8bff2a9cda2f987ae9 (diff)
downloadlighttpd1.4-c38eddfc29cd90ab312d912a63d89b0d74bd2a22.tar.gz
lighttpd1.4-c38eddfc29cd90ab312d912a63d89b0d74bd2a22.zip
[core] skip plugins_call_cleanup if not init'ed
-rw-r--r--src/plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c
index d88bd6bf..a5d694bc 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -343,7 +343,6 @@ PLUGIN_TO_SLOT(PLUGIN_FUNC_CONNECTION_RESET, connection_reset)
handler_t plugins_call_##y(server *srv) {\
plugin **slot;\
size_t j;\
- if (!srv->plugin_slots) return HANDLER_GO_ON;\
slot = ((plugin ***)(srv->plugin_slots))[x];\
if (!slot) return HANDLER_GO_ON;\
for (j = 0; j < srv->plugins.used && slot[j]; j++) { \
@@ -516,7 +515,7 @@ handler_t plugins_call_init(server *srv) {
void plugins_free(server *srv) {
size_t i;
- plugins_call_cleanup(srv);
+ if (srv->plugin_slots) plugins_call_cleanup(srv);
for (i = 0; i < srv->plugins.used; i++) {
plugin *p = ((plugin **)srv->plugins.ptr)[i];