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
495130c5
Commit
495130c5
authored
May 09, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: fix memory error handling
parent
0dd6028e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/misc/update.c
src/misc/update.c
+10
-10
No files found.
src/misc/update.c
View file @
495130c5
...
...
@@ -572,22 +572,22 @@ static void* update_DownloadReal( void *obj )
/* Create a buffer and fill it with the downloaded file */
p_buffer
=
(
void
*
)
malloc
(
1
<<
10
);
if
(
!
p_buffer
)
{
msg_Err
(
p_udt
,
"Can't malloc (1 << 10) bytes! download cancelled."
);
if
(
unlikely
(
p_buffer
==
NULL
)
)
goto
end
;
}
msg_Dbg
(
p_udt
,
"Downloading Stream '%s'"
,
p_update
->
release
.
psz_url
);
psz_size
=
size_str
(
l_size
);
if
(
asprintf
(
&
psz_status
,
_
(
"%s
\n
Downloading... %s/%s %.1f%% done"
),
p_update
->
release
.
psz_url
,
"0.0"
,
psz_size
,
0
.
0
)
!=
-
1
)
{
p_progress
=
dialog_ProgressCreate
(
p_udt
,
_
(
"Downloading ..."
),
psz_status
,
_
(
"Cancel"
)
);
free
(
psz_status
);
}
p_update
->
release
.
psz_url
,
"0.0"
,
psz_size
,
0
.
0
)
==
-
1
)
goto
end
;
p_progress
=
dialog_ProgressCreate
(
p_udt
,
_
(
"Downloading ..."
),
psz_status
,
_
(
"Cancel"
)
);
free
(
psz_status
);
if
(
p_progress
==
NULL
)
goto
end
;
while
(
vlc_object_alive
(
p_udt
)
&&
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
...
...
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