From dfeb0f938f8403071a86bc847a85e52269911cad Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 15 Jan 2016 13:27:12 +0000 Subject: [PATCH] Plugging another memory leak. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/winio.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cde542e9..006b5c28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2016-01-15 Benno Schulenberg + * src/winio.c (set_modified): Plug another memory leak. + 2016-01-15 Mike Frysinger * src/files.c (open_file): Free the full filename in all cases. diff --git a/src/winio.c b/src/winio.c index 5e2c73e6..8f1c79a6 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2108,8 +2108,9 @@ void set_modified(void) /* TRANSLATORS: Try to keep this at most 76 characters. */ statusbar(_("Warning: Modifying a file which is not locked, check directory permission?")); } else { - write_lockfile(openfile->lock_filename, - get_full_path(openfile->filename), TRUE); + char *fullname = get_full_path(openfile->filename); + write_lockfile(openfile->lock_filename, fullname, TRUE); + free(fullname); } } #endif -- 2.39.5