From 41ef6c3a216b6ab9553700606da3ed73024f5c67 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 12:00:55 +0000 Subject: Apply patch cscope-coverity-fixes.patch patch_name: cscope-coverity-fixes.patch present_in_specfile: true location_in_specfile: 1 --- diff --git a/src/egrep.c b/src/egrep.c index 587a61a..45bf093 100644 --- a/src/egrep.c +++ b/src/egrep.c @@ -1205,6 +1205,7 @@ yyparse (void) # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); + /* coverity[leaked_storage] */ } # endif #endif /* no yyoverflow */ diff --git a/src/logdir.c b/src/logdir.c index 63903f8..8d13b0c 100644 --- a/src/logdir.c +++ b/src/logdir.c @@ -79,8 +79,10 @@ logdir(char *name) if (line[j] == '\n') break; /* return a null pointer if the whole file has been read */ - if (j >= i) + if (j >= i) { + (void) close(pwf); return(0); + } line[++j] = 0; /* terminate the line */ (void) lseek(pwf, (long) (j - i), 1); /* point at the next line */ p = nextfield(line); /* get the logname */