Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
ebbecd97
Commit
ebbecd97
authored
May 26, 2009
by
Rémi Duraffort
Committed by
Jean-Baptiste Kempf
May 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
invmem: fix potential memleaks.
parent
88acacee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/codec/invmem.c
modules/codec/invmem.c
+5
-3
No files found.
modules/codec/invmem.c
View file @
ebbecd97
...
...
@@ -120,15 +120,16 @@ static int OpenDecoder( vlc_object_t *p_this )
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
if
(
(
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
return
VLC_ENOMEM
;
// get parametrs
p_sys
->
i_width
=
var_CreateGetInteger
(
p_this
,
"invmem-width"
);
p_sys
->
i_height
=
var_CreateGetInteger
(
p_this
,
"invmem-height"
);
if
(
p_sys
->
i_width
==
0
||
p_sys
->
i_height
==
0
)
{
if
(
p_sys
->
i_width
==
0
||
p_sys
->
i_height
==
0
)
{
msg_Err
(
p_dec
,
"--vmem-width and --vmem-height must be > 0"
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -147,6 +148,7 @@ static int OpenDecoder( vlc_object_t *p_this )
if
(
!
p_sys
->
pf_lock
||
!
p_sys
->
pf_unlock
)
{
msg_Err
(
p_dec
,
"Invalid lock or unlock callbacks"
);
free
(
p_sys
);
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