in write_file(), don't free backupname before displaying it in a
statusbar error message git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -1414,7 +1414,6 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
|
||||
openfile->current_stat->st_uid,
|
||||
openfile->current_stat->st_gid) == -1 ||
|
||||
utime(backupname, &filetime) == -1) {
|
||||
free(backupname);
|
||||
if (copy_status == -1) {
|
||||
statusbar(_("Error reading %s: %s"), realname,
|
||||
strerror(errno));
|
||||
@@ -1422,6 +1421,7 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
|
||||
} else
|
||||
statusbar(_("Error writing %s: %s"), backupname,
|
||||
strerror(errno));
|
||||
free(backupname);
|
||||
goto cleanup_and_exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user