mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Don't double-free comm when it's an existingProcess
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user