Skip to content

Commit 5c2f72f

Browse files
Andrey Sokolovjohannbg
authored andcommitted
fix(install): segfault on popen error
1 parent 1539845 commit 5c2f72f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/install/dracut-install.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ static int resolve_deps(const char *src)
550550
ret = 0;
551551

552552
fptr = popen(cmd, "r");
553+
if (fptr == NULL) {
554+
log_error("Error '%s' initiating pipe stream from '%s'", strerror(errno), cmd);
555+
exit(EXIT_FAILURE);
556+
}
553557

554558
while (!feof(fptr)) {
555559
char *p;

0 commit comments

Comments
 (0)