Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
c90a4451
Commit
c90a4451
authored
Nov 09, 2006
by
Hisham Muhammad
Browse files
Don't double-free comm when it's an existingProcess
parent
97ea7a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ProcessList.c
View file @
c90a4451
...
@@ -606,12 +606,12 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
...
@@ -606,12 +606,12 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
// Exception handler.
// Exception handler.
errorReadingProcess:
{
errorReadingProcess:
{
if
(
existingProcess
)
ProcessList_remove
(
this
,
process
);
if
(
process
->
comm
)
{
if
(
process
->
comm
)
{
free
(
process
->
comm
);
free
(
process
->
comm
);
process
->
comm
=
NULL
;
process
->
comm
=
NULL
;
}
}
if
(
existingProcess
)
ProcessList_remove
(
this
,
process
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment