c4aaf3
diff -up ./src/egrep.c.coverity2 ./src/egrep.c
c4aaf3
--- ./src/egrep.c.coverity2	2018-10-11 15:22:40.481384312 -0400
c4aaf3
+++ ./src/egrep.c	2018-10-11 15:23:31.152211589 -0400
c4aaf3
@@ -1205,6 +1205,7 @@ yyparse (void)
c4aaf3
 #  undef YYSTACK_RELOCATE
c4aaf3
         if (yyss1 != yyssa)
c4aaf3
           YYSTACK_FREE (yyss1);
c4aaf3
+	/* coverity[leaked_storage] */
c4aaf3
       }
c4aaf3
 # endif
c4aaf3
 #endif /* no yyoverflow */
c4aaf3
diff -up ./src/logdir.c.coverity2 ./src/logdir.c
c4aaf3
--- ./src/logdir.c.coverity2	2018-10-11 15:23:50.009147309 -0400
c4aaf3
+++ ./src/logdir.c	2018-10-11 15:24:26.279023664 -0400
c4aaf3
@@ -79,8 +79,10 @@ logdir(char *name)
c4aaf3
 			if (line[j] == '\n')
c4aaf3
 				break;
c4aaf3
 		/* return a null pointer if the whole file has been read */
c4aaf3
-		if (j >= i)
c4aaf3
+		if (j >= i) {
c4aaf3
+			(void) close(pwf);
c4aaf3
 			return(0);
c4aaf3
+		}
c4aaf3
 		line[++j] = 0;			/* terminate the line */
c4aaf3
 		(void) lseek(pwf, (long) (j - i), 1);	/* point at the next line */
c4aaf3
 		p = nextfield(line);		/* get the logname */