mirror of https://github.com/xzeldon/htop.git
Check for fdopen failure in OpenFilesScreen_getProcessData
This commit is contained in:
parent
b096fdbfc0
commit
1efddaf1e5
|
@ -88,6 +88,10 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
|
||||||
OpenFiles_FileData* fdata = NULL;
|
OpenFiles_FileData* fdata = NULL;
|
||||||
|
|
||||||
FILE* fd = fdopen(fdpair[0], "r");
|
FILE* fd = fdopen(fdpair[0], "r");
|
||||||
|
if (!fd) {
|
||||||
|
pdata->error = 1;
|
||||||
|
return pdata;
|
||||||
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char* line = String_readLine(fd);
|
char* line = String_readLine(fd);
|
||||||
if (!line) {
|
if (!line) {
|
||||||
|
|
Loading…
Reference in New Issue