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; }