From: Richard W.M. Jones Date: Tue, 21 Sep 2010 18:49:08 +0000 (+0100) Subject: leak: Clear history before exiting guestfish. X-Git-Tag: 1.5.17~4 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=8c5a4d949ee8ffe4ac7f373e667f2f8930db4543;p=libguestfs.git 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). --- diff --git a/fish/fish.c b/fish/fish.c index de11b2f..6192860 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 }