X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=miniexpect.c;h=7f02584d500bbb9acf7b4c1557146f3093dba8fd;hb=469839bd6141f85d6382dc1878d97456ff80d9ea;hp=fef03fddbe5755e5746f8bf0ed12dca16405a8a9;hpb=16d4443d47b7a6943ae25cdfad57a5645d7a063c;p=miniexpect.git diff --git a/miniexpect.c b/miniexpect.c index fef03fd..7f02584 100644 --- a/miniexpect.c +++ b/miniexpect.c @@ -80,6 +80,8 @@ mexp_close (mexp_h *h) return -1; } + free (h); + return status; } @@ -208,6 +210,10 @@ mexp_expect (mexp_h *h, const mexp_regexp *regexps, int *ovector, int ovecsize) time (&start_t); /* Clear the read buffer. */ + /* XXX This is possibly incorrect because it throws away inputs that + * may not have been matched yet. A better idea is to record the + * end of the previous match and only throw that away. + */ clear_buffer (h); for (;;) {