]> git.wh0rd.org Git - nano.git/commitdiff
Plugging another memory leak.
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 15 Jan 2016 13:27:12 +0000 (13:27 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 15 Jan 2016 13:27:12 +0000 (13:27 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/winio.c

index cde542e90bfb6e975bb892dd7dc748d1664ae81c..006b5c281cc35553e7fd4d894c937523e1e0ce31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-01-15  Benno Schulenberg  <bensberg@justemail.net>
+       * src/winio.c (set_modified): Plug another memory leak.
+
 2016-01-15  Mike Frysinger  <vapier@gentoo.org>
        * src/files.c (open_file): Free the full filename in all cases.
 
index 5e2c73e661413cd5900ca98f8a8c3be911eaa795..8f1c79a6da928171764f6d052dc83392a36b7dee 100644 (file)
@@ -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