Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7b7a390b
Commit
7b7a390b
authored
Oct 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB-XV: fix memleak when port grabbing fails
parent
8b65aa8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+9
-10
No files found.
modules/video_output/xcb/xvideo.c
View file @
7b7a390b
...
...
@@ -335,7 +335,7 @@ static int Open (vlc_object_t *obj)
xcb_xv_adaptor_info_iterator_t
it
;
for
(
it
=
xcb_xv_query_adaptors_info_iterator
(
adaptors
);
it
.
rem
>
0
;
it
.
rem
>
0
&&
!
found_adaptor
;
xcb_xv_adaptor_info_next
(
&
it
))
{
const
xcb_xv_adaptor_info_t
*
a
=
it
.
data
;
...
...
@@ -380,10 +380,7 @@ static int Open (vlc_object_t *obj)
}
if
(
xfmt
==
NULL
)
/* No acceptable image formats */
{
free
(
r
);
continue
;
}
goto
skip_adaptor
;
/* Grab a port */
for
(
unsigned
i
=
0
;
i
<
a
->
num_ports
;
i
++
)
...
...
@@ -398,13 +395,15 @@ static int Open (vlc_object_t *obj)
if
(
result
==
0
)
{
p_sys
->
port
=
port
;
goto
grabbed_port
;
found_adaptor
=
true
;
break
;
}
msg_Dbg
(
vd
,
"cannot grab port %"
PRIu32
,
port
);
}
continue
;
if
(
!
found_adaptor
)
goto
skip_adaptor
;
grabbed_port:
/* Found port - initialize selected format */
name
=
strndup
(
xcb_xv_adaptor_info_name
(
a
),
a
->
name_size
);
if
(
name
!=
NULL
)
{
...
...
@@ -422,9 +421,9 @@ static int Open (vlc_object_t *obj)
fmt
.
i_gmask
=
xfmt
->
green_mask
;
fmt
.
i_bmask
=
xfmt
->
blue_mask
;
}
skip_adaptor:
free
(
r
);
found_adaptor
=
true
;
break
;
}
free
(
adaptors
);
if
(
!
found_adaptor
)
...
...
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