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
282f16c4
Commit
282f16c4
authored
Mar 03, 2010
by
Hisham Muhammad
Browse files
fix memory leak
parent
a600d5a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
OpenFilesScreen.c
View file @
282f16c4
...
...
@@ -91,7 +91,10 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(int pid) {
break
;
anyRead
=
true
;
char
*
entry
=
malloc
(
1024
);
if
(
!
fgets
(
entry
,
1024
,
fd
))
break
;
if
(
!
fgets
(
entry
,
1024
,
fd
))
{
free
(
entry
);
break
;
}
char
*
newline
=
strrchr
(
entry
,
'\n'
);
*
newline
=
'\0'
;
if
(
cmd
==
'f'
)
{
...
...
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