Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
68ab6616
Commit
68ab6616
authored
Mar 18, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_omapfb: fix potential leaks.
parent
badc5d5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/video_output/omapfb.c
modules/video_output/omapfb.c
+10
-4
No files found.
modules/video_output/omapfb.c
View file @
68ab6616
/*****************************************************************************
* omapfb.c : omap framebuffer plugin for vlc
*****************************************************************************
* Copyright (C) 2008 the VideoLAN team
* Copyright (C) 2008
-2009
the VideoLAN team
* $Id$
*
* Authors: Antoine Lejeune <phytos @ videolan.org>
...
...
@@ -191,10 +191,9 @@ static int Create( vlc_object_t *p_this )
return
VLC_EGENERIC
;
/* Allocate instance and initialize some members */
p_vout
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
vout_sys_t
)
);
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_end
=
End
;
...
...
@@ -556,7 +555,6 @@ static int OpenDisplay( vout_thread_t *p_vout )
return
VLC_EGENERIC
;
}
free
(
psz_device
);
psz_device
=
NULL
;
// Get caps, try older interface if needed
if
(
ioctl
(
p_sys
->
i_fd
,
OMAPFB_GET_CAPS
,
&
p_sys
->
caps
)
!=
0
)
...
...
@@ -575,11 +573,13 @@ static int OpenDisplay( vout_thread_t *p_vout )
if
(
ioctl
(
p_sys
->
i_fd
,
FBIOGET_VSCREENINFO
,
&
p_sys
->
fb_vinfo
)
)
{
msg_Err
(
p_vout
,
"Can't get VSCREENINFO: %s"
,
strerror
(
errno
)
);
close
(
p_sys
->
i_fd
);
return
VLC_EGENERIC
;
}
if
(
ioctl
(
p_sys
->
i_fd
,
FBIOGET_FSCREENINFO
,
&
p_sys
->
fb_finfo
)
)
{
msg_Err
(
p_vout
,
"Can't get FSCREENINFO: %s"
,
strerror
(
errno
)
);
close
(
p_sys
->
i_fd
);
return
VLC_EGENERIC
;
}
...
...
@@ -591,6 +591,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
p_sys
->
i_fd
,
0
))
==
MAP_FAILED
)
{
msg_Err
(
p_vout
,
"Can't mmap: %s"
,
strerror
(
errno
)
);
close
(
p_sys
->
i_fd
);
return
VLC_EGENERIC
;
}
...
...
@@ -601,6 +602,8 @@ static int OpenDisplay( vout_thread_t *p_vout )
if
(
p_sys
->
i_null_fd
==
-
1
)
{
msg_Err
(
p_vout
,
"cannot open /dev/zero (%m)"
);
munmap
(
p_sys
->
p_video
,
p_sys
->
i_page_size
);
close
(
p_sys
->
i_fd
);
return
VLC_EGENERIC
;
}
...
...
@@ -608,6 +611,9 @@ static int OpenDisplay( vout_thread_t *p_vout )
MAP_PRIVATE
,
p_sys
->
i_null_fd
,
0
))
==
MAP_FAILED
)
{
msg_Err
(
p_vout
,
"Can't mmap 2: %s"
,
strerror
(
errno
)
);
munmap
(
p_sys
->
p_video
,
p_sys
->
i_page_size
);
close
(
p_sys
->
i_null_fd
);
close
(
p_sys
->
i_fd
);
return
VLC_EGENERIC
;
}
...
...
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