From 8e9a9bb750504593180591ba927df136252a2532 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sat, 5 Aug 2017 20:41:37 +0700 Subject: Fix memory leak Call FIND_RESTORE_HL make a memory leak --- kilo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kilo.c b/kilo.c index 9490a77..b54ac8d 100644 --- a/kilo.c +++ b/kilo.c @@ -998,6 +998,7 @@ void editorFind(int fd) { #define FIND_RESTORE_HL do { \ if (saved_hl) { \ memcpy(E.row[saved_hl_line].hl,saved_hl, E.row[saved_hl_line].rsize); \ + free(saved_hl); \ saved_hl = NULL; \ } \ } while (0) -- cgit v1.2.3