mirror of
https://github.com/dvorka/hstr.git
synced 2024-11-10 09:03:06 +08:00
This commit is contained in:
parent
c0ee839bd7
commit
981d425ec3
2 changed files with 8 additions and 5 deletions
|
@ -25,7 +25,7 @@ fi
|
|||
|
||||
# test history file - comment ALL HISTFILE exports below for test w/ production
|
||||
#export HISTFILE=`pwd`/test/resources/.bash_history_valgrind_empty
|
||||
#export HISTFILE=`pwd`/test/resources/.bash_history_valgrind_1_entry
|
||||
export HISTFILE=`pwd`/test/resources/.bash_history_valgrind_1_entry
|
||||
|
||||
# Valgrind
|
||||
valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr -n hist
|
||||
|
|
|
@ -221,14 +221,12 @@ HistoryItems* prioritized_history_create(int optionBigKeys, HashSet *blacklist)
|
|||
|
||||
radixsort_destroy(&rs);
|
||||
|
||||
// readline cleanup
|
||||
// history/readline cleanup, clear_history() called on exit as entries are used by raw view
|
||||
free(historyState);
|
||||
clear_history();
|
||||
return prioritizedHistory;
|
||||
} else {
|
||||
// readline cleanup
|
||||
// history/readline cleanup, clear_history() called on exit as entries are used by raw view
|
||||
free(historyState);
|
||||
clear_history();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -249,7 +247,12 @@ void prioritized_history_destroy(HistoryItems* h)
|
|||
if(h->rawItems) {
|
||||
free(h->rawItems);
|
||||
}
|
||||
|
||||
free(h);
|
||||
|
||||
// readline/history cleanup
|
||||
free(history_get_history_state());
|
||||
clear_history();
|
||||
}
|
||||
|
||||
void history_mgmt_open(void)
|
||||
|
|
Loading…
Reference in a new issue