diff options
author | gdt <gdt> | 2003-12-22 20:18:18 +0000 |
---|---|---|
committer | gdt <gdt> | 2003-12-22 20:18:18 +0000 |
commit | fb63f6245dece74ced53dc52c6c66ad99c8e61b1 (patch) | |
tree | 05a6774fe0443b698d11da581ca406d78ef183eb | |
parent | 29d3f53fdb17548a020683f1cc18cb4b78a8116c (diff) | |
download | quagga-fb63f6245dece74ced53dc52c6c66ad99c8e61b1.tar.bz2 quagga-fb63f6245dece74ced53dc52c6c66ad99c8e61b1.tar.xz |
Reorder free(f); unlink(f); to unlink before freeing.import.isisd.sf.20031223
-rw-r--r-- | lib/ChangeLog | 5 | ||||
-rw-r--r-- | lib/vty.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 55056864..6e452c3b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2003-12-22 Greg Troxel <gdt@fnord.ir.bbn.com> + + * vty.c (vty_use_backup_config): Don't free filenames before using + them for unlink. + 2003-08-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * command.c: Fix <cr> display problem for command line @@ -2173,9 +2173,9 @@ vty_use_backup_config (char *fullpath) sav = open (fullpath_sav, O_RDONLY); if (sav < 0) { + unlink (fullpath_tmp); free (fullpath_sav); free (fullpath_tmp); - unlink (fullpath_tmp); return NULL; } @@ -2187,9 +2187,9 @@ vty_use_backup_config (char *fullpath) if (chmod(fullpath_tmp, CONFIGFILE_MASK) != 0) { + unlink (fullpath_tmp); free (fullpath_sav); free (fullpath_tmp); - unlink (fullpath_tmp); return NULL; } |