diff --git a/ChangeLog b/ChangeLog index 6af15c5aaf88dd5ee30f8f6a931ca29ca458996c..93de95a7d7068bcb0fc29c1d445fe2bfb760f2af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ CVS code - consistency. (DLR) - Rename NANO_ALT_.* and NANO_.*ALTKEY to NANO_META_.* and NANO_.*METAKEY, for consistency. (DLR) +- search.c: + update_history() + - Fix minor memory leak. (DLR) - text.c: do_spell() - When setting i to the return value of write_(marked_)?file(), diff --git a/src/search.c b/src/search.c index 402f37d6ec8de85e5eba82496cec49a03e4b4016..435826e4af75f13d101c05aa6428d0e6bef6395c 100644 --- a/src/search.c +++ b/src/search.c @@ -1342,7 +1342,7 @@ void update_history(filestruct **h, const char *s) } /* Add the new entry to the end. */ - (*hbot)->data = mallocstrcpy(NULL, s); + (*hbot)->data = mallocstrcpy((*hbot)->data, s); splice_node(*hbot, make_new_node(*hbot), (*hbot)->next); *hbot = (*hbot)->next; (*hbot)->data = mallocstrcpy(NULL, "");