From ec17a98d42d8f90d8cbefb01943562a63f2e74d5 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 17 Nov 2019 14:27:09 +0000 Subject: Actually clean up the filesystem when ending a session This requires storing the client path in the wpactrl_t, which uses memory, GOD I HATE THAT STUPID IPC MECHANISM --- src/libwpactrl/wpactrl_end.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libwpactrl/wpactrl_end.c') diff --git a/src/libwpactrl/wpactrl_end.c b/src/libwpactrl/wpactrl_end.c index a14b6c8..41ea81a 100644 --- a/src/libwpactrl/wpactrl_end.c +++ b/src/libwpactrl/wpactrl_end.c @@ -1,14 +1,21 @@ /* ISC license. */ +#include #include #include + #include void wpactrl_end (wpactrl_t *a) { + a->clientpath.s[a->clientpath.len - 2] = 's' ; + unlink_void(a->clientpath.s) ; + a->clientpath.s[a->clientpath.len - 2] = 'a' ; + unlink_void(a->clientpath.s) ; fd_close(a->fda) ; fd_close(a->fds) ; stralloc_free(&a->filters) ; stralloc_free(&a->data) ; + stralloc_free(&a->clientpath) ; *a = wpactrl_zero ; } -- cgit v1.2.3