Skip to content

Commit

Permalink
[lib] Minor fixups to the unicode inspection code
Browse files Browse the repository at this point in the history
Signed-off-by: David Cantrell <dcantrell@redhat.com>
  • Loading branch information
dcantrell committed Apr 28, 2023
1 parent da1f834 commit 3f65e03
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/inspect_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ static char *rpm_prep_source(struct rpminspect *ri, const rpmfile_entry_t *file,
warn("close");
}

if (close(STDOUT_FILENO)) {
warn("close");
_exit(EXIT_FAILURE);
}

if (close(STDERR_FILENO)) {
warn("close");
_exit(EXIT_FAILURE);
}

_exit(status);
} else if (proc == -1) {
/* failure */
Expand Down Expand Up @@ -262,7 +272,7 @@ static char *rpm_prep_source(struct rpminspect *ri, const rpmfile_entry_t *file,

/* wipe the working directory if %prep failed */
if (WEXITSTATUS(status) == 2) {
rmtree(build, true, true);
(void) rmtree(build, true, true);
free(build);
build = NULL;
}
Expand Down

0 comments on commit 3f65e03

Please sign in to comment.