Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit 48598fc0 authored by Rob Swindell's avatar Rob Swindell 💬

Fix memory leak (of extended description) when moving files

parent e2252f02
Pipeline #2376 passed with stage
in 9 minutes and 39 seconds
......@@ -240,7 +240,9 @@ bool sbbs_t::movefile(smb_t* smb, file_t* f, int newdir)
newfile.dfield = NULL; // addfile() ends up realloc'ing dfield (in smb_addmsg)
if(!addfile(&cfg, newdir, &newfile, newfile.extdesc, newfile.metadata, /* client: */NULL))
bool result = addfile(&cfg, newdir, &newfile, newfile.extdesc, newfile.metadata, /* client: */NULL);
return false;
if(!removefile(smb, f)) // Use ::removefile() here instead?
return false;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment