summaryrefslogtreecommitdiffstats
path: root/fish/fish.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-09-21 19:49:08 +0100
committerRichard W.M. Jones <rjones@redhat.com>2010-09-21 19:51:22 +0100
commit8c5a4d949ee8ffe4ac7f373e667f2f8930db4543 (patch)
tree3843e2785a4d8707f6bea90aa220478e34a2f746 /fish/fish.c
parent8ea62c8d7f3f7f7e4057b93105cf979271aa13f4 (diff)
downloadlibguestfs-8c5a4d949ee8ffe4ac7f373e667f2f8930db4543.tar.gz
libguestfs-8c5a4d949ee8ffe4ac7f373e667f2f8930db4543.tar.xz
libguestfs-8c5a4d949ee8ffe4ac7f373e667f2f8930db4543.zip
leak: Clear history before exiting guestfish.
Clear the in-memory history before exiting. This removes some but not all memory leaks associated with using the GNU History library. As far as I can tell it is not possible to free up everything used by GNU History. (Found by valgrind).
Diffstat (limited to 'fish/fish.c')
-rw-r--r--fish/fish.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fish/fish.c b/fish/fish.c
index de11b2fe..6192860b 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -1436,6 +1436,7 @@ cleanup_readline (void)
#else
(void) write_history (histfile);
#endif
+ clear_history ();
}
#endif
}