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
ffcfa6da
Commit
ffcfa6da
authored
Jul 14, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
androidsurface: fix double free on error
parent
e197e2b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/video_output/androidsurface.c
modules/video_output/androidsurface.c
+9
-6
No files found.
modules/video_output/androidsurface.c
View file @
ffcfa6da
...
...
@@ -224,11 +224,13 @@ static int Open(vlc_object_t *p_this)
msg_Dbg
(
vd
,
"Pixel format %4.4s"
,
(
char
*
)
&
fmt
.
i_chroma
);
/* Create the associated picture */
picture_resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_sys
=
malloc
(
sizeof
(
*
rsc
->
p_sys
));
if
(
!
rsc
->
p_sys
)
picture_sys_t
picsys
=
malloc
(
sizeof
(
*
picsys
));
if
(
unlikely
(
picsys
==
NULL
))
goto
enomem
;
rsc
->
p_sys
->
sys
=
sys
;
picsys
->
sys
=
sys
;
picture_resource_t
*
rsc
=
&
sys
->
resource
;
rsc
->
p_sys
=
picsys
;
for
(
int
i
=
0
;
i
<
PICTURE_PLANE_MAX
;
i
++
)
{
rsc
->
p
[
i
].
p_pixels
=
NULL
;
...
...
@@ -236,8 +238,10 @@ static int Open(vlc_object_t *p_this)
rsc
->
p
[
i
].
i_lines
=
0
;
}
picture_t
*
picture
=
picture_NewFromResource
(
&
fmt
,
rsc
);
if
(
!
picture
)
if
(
!
picture
)
{
free
(
picsys
);
goto
enomem
;
}
/* Wrap it into a picture pool */
picture_pool_configuration_t
pool_cfg
;
...
...
@@ -271,7 +275,6 @@ static int Open(vlc_object_t *p_this)
return
VLC_SUCCESS
;
enomem:
free
(
rsc
->
p_sys
);
dlclose
(
sys
->
p_library
);
free
(
sys
);
vlc_mutex_unlock
(
&
single_instance
);
...
...
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