Blame SOURCES/cscope-coverity-fixes.patch

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