]> git.wh0rd.org Git - nano.git/commitdiff
miscellaneous minor fixes
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 14 Dec 2006 21:57:03 +0000 (21:57 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Thu, 14 Dec 2006 21:57:03 +0000 (21:57 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3998 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c

index b83e6596b3fc806e4f4dc6887ba9e42a00e10042..35dbb2283d1b1d12edeebae9d0d3f679f49a1ed0 100644 (file)
@@ -1901,8 +1901,10 @@ int do_writeout(bool exiting)
                        full_filename != NULL && strcmp(full_answer,
                        full_filename) != 0);
 
-               free(full_filename);
-               free(full_answer);
+               if (full_filename != NULL)
+                   free(full_filename);
+               if (full_answer != NULL)
+                   free(full_answer);
 
                if (different_name) {
                    if (name_exists) {