Plug a memory leak

This commit is contained in:
Holger Vogt 2024-06-22 16:32:41 +02:00
parent d01868b725
commit 14bb63490c
1 changed files with 2 additions and 1 deletions

View File

@ -9504,7 +9504,7 @@ int add_to_sourcepath(const char* filepath, const char* path)
/* if filepath, remove file entry */
if (path)
fpath = path;
fpath = copy(path);
else
fpath = ngdirname(filepath);
@ -9531,5 +9531,6 @@ int add_to_sourcepath(const char* filepath, const char* path)
wl_free(wl);
}
tfree(fpath);
return 0;
}