Blame SOURCES/cscope-coverity-fixes.patch

204343
diff -up ./src/command.c.coverity2 ./src/command.c
204343
--- ./src/command.c.coverity2	2018-10-11 15:20:44.113781058 -0400
204343
+++ ./src/command.c	2018-10-11 15:21:35.078607301 -0400
204343
@@ -785,7 +785,6 @@ changestring(void)
204343
 	}
204343
     }
204343
     fprintf(script, "w\nq\n!\n");	/* write and quit */
204343
-    fclose(script);
204343
 
204343
     /* if any line was marked */
204343
     if (anymarked == YES) {
204343
diff -up ./src/egrep.c.coverity2 ./src/egrep.c
204343
--- ./src/egrep.c.coverity2	2018-10-11 15:22:40.481384312 -0400
204343
+++ ./src/egrep.c	2018-10-11 15:23:31.152211589 -0400
204343
@@ -1205,6 +1205,7 @@ yyparse (void)
204343
 #  undef YYSTACK_RELOCATE
204343
         if (yyss1 != yyssa)
204343
           YYSTACK_FREE (yyss1);
204343
+	/* coverity[leaked_storage] */
204343
       }
204343
 # endif
204343
 #endif /* no yyoverflow */
204343
diff -up ./src/logdir.c.coverity2 ./src/logdir.c
204343
--- ./src/logdir.c.coverity2	2018-10-11 15:23:50.009147309 -0400
204343
+++ ./src/logdir.c	2018-10-11 15:24:26.279023664 -0400
204343
@@ -79,8 +79,10 @@ logdir(char *name)
204343
 			if (line[j] == '\n')
204343
 				break;
204343
 		/* return a null pointer if the whole file has been read */
204343
-		if (j >= i)
204343
+		if (j >= i) {
204343
+			(void) close(pwf);
204343
 			return(0);
204343
+		}
204343
 		line[++j] = 0;			/* terminate the line */
204343
 		(void) lseek(pwf, (long) (j - i), 1);	/* point at the next line */
204343
 		p = nextfield(line);		/* get the logname */