summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kilo.c1
1 files changed, 1 insertions, 0 deletions
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)