From f2fea51ba371cabfc04630eb8b54868c66289302 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Tue, 11 Mar 2025 19:01:01 +0100 Subject: [PATCH] fix memleak --- pclsync/plibs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pclsync/plibs.c b/pclsync/plibs.c index a164190..e5d8988 100644 --- a/pclsync/plibs.c +++ b/pclsync/plibs.c @@ -2617,7 +2617,9 @@ int psync_debug(const char *file, const char *function, int unsigned line, break; } if (unlikely(!log)) { - log = fopen(psync_debug_path(), "a+"); + char *path = psync_debug_path(); + log = fopen(path, "a+"); + free(path); if (!log) return 1; }