Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EDAF55
C-camera
Commits
8b9c57c9
Commit
8b9c57c9
authored
Nov 22, 2016
by
Sven Gestegård Robertz
Browse files
fixed file descriptor and possible memory leak
parent
8d5eeb95
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/fakecapture.c
View file @
8b9c57c9
...
...
@@ -55,8 +55,13 @@ capture_get_frame(media_stream *stream)
res
->
sz
=
read
(
fd
,
res
->
data
,
FRAME_BUF_SZ
);
if
(
res
->
sz
<
0
)
{
perror
(
"fakecapture:capture_get_frame:read"
);
return
NULL
;
free
(
res
);
res
=
NULL
;
}
if
(
close
){
perror
(
"Warning! fakecapture:capture_get_frame:close"
);
}
return
res
;
}
...
...
Write
Preview
Supports
Markdown
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