diff --git a/asearch.c b/asearch.c index 5a57e11..d3b19cf 100644 --- a/asearch.c +++ b/asearch.c @@ -234,7 +234,6 @@ register unsigned D; { if(FILENAMEONLY && (NEW_FILE || !POST_FILTER)) { num_of_matched++; - free_buf(text, buffer); if (agrep_finalfp != NULL) fprintf(agrep_finalfp, "%s\n", CurrentFileName); else { diff --git a/sgrep.c b/sgrep.c index 9dce86c..3a60b8c 100644 --- a/sgrep.c +++ b/sgrep.c @@ -1120,7 +1120,9 @@ register CHARTYPE *text, *textend, *pat, *oldpat; CHARTYPE *lastout = text; int newlen; - Candidate[0][0] = Candidate[0][1] = 0; + Candidate[0][0] = 0; + Candidate[0][1] = 0; + Candidate[1][0] = 0; d1 = shift_1; cdx = 0; if(m < 3) r1 = m;