Check for fdopen failure in OpenFilesScreen_getProcessData

This commit is contained in:
Christian Göttsche 2020-09-15 19:56:52 +02:00 committed by cgzones
parent b096fdbfc0
commit 1efddaf1e5

View File

@ -88,6 +88,10 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
OpenFiles_FileData* fdata = NULL;
FILE* fd = fdopen(fdpair[0], "r");
if (!fd) {
pdata->error = 1;
return pdata;
}
for (;;) {
char* line = String_readLine(fd);
if (!line) {