Fix a minor memory leak.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 14 Jun 2017 12:50:41 +0000 (08:50 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 14 Jun 2017 12:50:41 +0000 (08:50 -0400)
saveresume.c

index 340ea65cd6dc53e3757b5485551cd521d198ba1a..af94c4aa2043b8d5d7d16273bac2ae99036d15cc 100644 (file)
@@ -59,8 +59,8 @@ int saveresume(FILE *input, bool resume)
        fp = fopen(name,(resume ? READ_MODE : WRITE_MODE));
        if (fp == NULL)
            printf("Can't open file %s, try again.\n", name); 
+       linenoiseFree(name);
     }
-    linenoiseFree(name);
     
     DATIME(&i,&k);
     k=i+650*k;