aboutsummaryrefslogtreecommitdiffstats
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)
downloadyosys-ff965424c2bc82cba4380a785b1a22c3249686fd.tar.gz
yosys-ff965424c2bc82cba4380a785b1a22c3249686fd.tar.bz2
yosys-ff965424c2bc82cba4380a785b1a22c3249686fd.zip
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 0bb12f94d..8765c8b87 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);