From 46f3a1765823c3b921d9c020125e39bbbba56d31 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 23 Jun 2020 16:55:38 -0700 Subject: [PATCH] vere: free pier on graceful shutdown --- pkg/urbit/vere/pier.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkg/urbit/vere/pier.c b/pkg/urbit/vere/pier.c index de6eb23401..e4da5e2f93 100644 --- a/pkg/urbit/vere/pier.c +++ b/pkg/urbit/vere/pier.c @@ -1395,12 +1395,29 @@ _pier_work_close(u3_work* wok_u) wok_u->pep_u.data = wok_u; } +/* _pier_done(): dispose pier. +*/ +static void +_pier_free(u3_pier* pir_u) +{ + c3_free(pir_u->pax_c); + + // XX remove + // + c3_free(pir_u->sav_u); + + c3_free(pir_u); +} + +/* _pier_done(): graceful shutdown complete, notify king. +*/ static void _pier_done(u3_pier* pir_u) { // XX unlink properly // u3K.pir_u = 0; + _pier_free(pir_u); u3_king_done(); }