Fix memleak and assignment for cached lengths in corrector
authorDale Weiler <killfieldengine@gmail.com>
Fri, 1 Feb 2013 06:22:29 +0000 (06:22 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 1 Feb 2013 06:22:29 +0000 (06:22 +0000)
correct.c

index 526e42c3b81a79524c948429a47a0953055c839a..6f234b0a2e985608aa777127370bd65259fca927 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -502,11 +502,13 @@ void correct_init(correction_t *c)
 {
     correct_pool_new();
     c->edits = NULL;
+    c->lens  = NULL;
 }
 
 void correct_free(correction_t *c)
 {
     vec_free(c->edits);
+    vec_free(c->lens);
     correct_pool_delete();
 }