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
ac4b4c89
Commit
ac4b4c89
authored
Jul 28, 2008
by
Rafaël Carré
Committed by
Jean-Paul Saman
Nov 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error path of AllocateBuffer()
Signed-off-by:
Jean-Paul Saman
<
jean-paul.saman@m2x.nl
>
parent
b38c7942
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
modules/codec/davinci/davinci.c
modules/codec/davinci/davinci.c
+6
-9
No files found.
modules/codec/davinci/davinci.c
View file @
ac4b4c89
...
...
@@ -140,23 +140,20 @@ int __AllocateBuffer( vlc_object_t *p_this, XDAS_Int32 i_num,
for
(
i
=
0
;
i
<
i_num
;
i
++
)
{
#ifdef DEBUG_DAVINCI
msg_Info
(
p_this
,
"
%d: size %d Bytes"
,
i
,
(
int
)
pi_sizes
[
i
]
);
msg_Info
(
p_this
,
"
\t
%d: size %d Bytes"
,
i
,
(
int
)
pi_sizes
[
i
]
);
#endif
buf
->
bufSizes
[
i
]
=
pi_sizes
[
i
];
buf
->
bufs
[
i
]
=
Memory_contigAlloc
(
pi_sizes
[
i
],
Memory_DEFAULTALIGNMENT
);
if
(
!
buf
->
bufs
[
i
]
)
{
#ifdef DEBUG_DAVINCI
msg_Err
(
p_this
,
"Failed to allocate buffer"
);
#endif
for
(
i
--
;
i
>=
0
;
i
--
)
{
Memory_contigFree
(
buf
->
bufs
[
i
],
buf
->
bufSizes
[
i
]
);
free
(
buf
->
bufs
);
free
(
buf
->
bufSize
s
);
buf
->
numBufs
=
0
;
return
VLC_ENOMEM
;
}
free
(
buf
->
buf
s
);
free
(
buf
->
bufSizes
)
;
buf
->
numBufs
=
0
;
return
VLC_ENOMEM
;
}
}
return
VLC_SUCCESS
;
...
...
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