summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhuzhenjun <[email protected]>2024-01-09 08:32:16 +0000
committer祝振军 <[email protected]>2024-01-09 08:52:17 +0000
commitf8ff15d741c4f5c90830aaefead6d30def923ab0 (patch)
treec1ce1f2170d2cc5c0b418ef695f7e9a5ae79d4aa
parent2e87c66111cf1ada80bd9b3e46dcd4d975a9c27d (diff)
Fix: A plugin that is not registered with a mq can lead to a crash upon exiting.devzz
-rw-r--r--src/adapter/adapter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/adapter/adapter.c b/src/adapter/adapter.c
index fac7b1b..c1e99a8 100644
--- a/src/adapter/adapter.c
+++ b/src/adapter/adapter.c
@@ -139,7 +139,9 @@ void stellar_exit(struct stellar *st)
p->specs.exit_cb(p->plugin_ctx);
}
}
- utarray_free(st->session_mq_schema_array);
+ if(st->session_mq_schema_array) {
+ utarray_free(st->session_mq_schema_array);
+ }
utarray_free(st->session_exdata_schema_array);
utarray_free(st->intrinsic_session_event_schema_array);
utarray_free(st->plugin_specs_array);