mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Don't double-free comm when it's an existingProcess
This commit is contained in:
parent
97ea7a1a8c
commit
c90a445103
@ -606,12 +606,12 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
|
||||
|
||||
// Exception handler.
|
||||
errorReadingProcess: {
|
||||
if (existingProcess)
|
||||
ProcessList_remove(this, process);
|
||||
if (process->comm) {
|
||||
free(process->comm);
|
||||
process->comm = NULL;
|
||||
}
|
||||
if (existingProcess)
|
||||
ProcessList_remove(this, process);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user