summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-08-06 15:03:46 +0200
committerClifford Wolf <clifford@clifford.at>2013-08-06 15:03:46 +0200
commitff965424c2bc82cba4380a785b1a22c3249686fd (patch)
tree2d7e89399793c7d69229adcf967617e902f53dac /kernel
parent8b2f7792ba7a1f4c42f6185a24bd49c6f6985863 (diff)
Added proper deallocation of history buffer
Diffstat (limited to 'kernel')
-rw-r--r--kernel/driver.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc
index 0bb12f94..8765c8b8 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -617,6 +617,11 @@ int main(int argc, char **argv)
write_history(history_file.c_str());
}
+ clear_history();
+ HIST_ENTRY **hist_list = history_list();
+ if (hist_list != NULL)
+ free(hist_list);
+
for (auto f : log_files)
if (f != stderr)
fclose(f);