Commit 8b9c57c9 authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

fixed file descriptor and possible memory leak

parent 8d5eeb95
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment