fix memleak

This commit is contained in:
Levi Neely 2025-03-11 19:01:01 +01:00
parent 0f89a6ba87
commit f2fea51ba3
1 changed files with 3 additions and 1 deletions

View File

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