From 9c8e69003ddb9fab237413b7d1896c0639d987b7 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 5 Mar 2022 18:31:02 +0100 Subject: [PATCH] Fix use-after-free and double-free --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3d482e9..08bbfdf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,8 +51,10 @@ WUMS_APPLICATION_ENDS() { if (gFSClient) { FSDelClient(gFSClient, FS_ERROR_FLAG_ALL); free(gFSClient); + gFSClient = nullptr; } free(gFSCmd); + gFSCmd = nullptr; deinitLogging(); }