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
bbf068ed
Commit
bbf068ed
authored
Dec 14, 2013
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
livehttp: fix many memory leaks
parent
14ef6fce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
modules/access_output/livehttp.c
modules/access_output/livehttp.c
+14
-10
No files found.
modules/access_output/livehttp.c
View file @
bbf068ed
...
...
@@ -308,16 +308,23 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
uint8_t
key
[
16
];
char
*
keyfile
=
NULL
;
if
(
!
p_sys
->
key_uri
)
/*No key uri, assume no encryption wanted*/
{
msg_Dbg
(
p_access
,
"No key uri, no encryption"
);
return
VLC_SUCCESS
;
}
if
(
key_file
)
keyfile
=
strdup
(
key_file
);
else
keyfile
=
var_InheritString
(
p_access
,
SOUT_CFG_PREFIX
"key-file"
);
if
(
!
p_sys
->
key_uri
)
/*No key uri, assume no encryption wanted*/
if
(
unlikely
(
keyfile
==
NULL
)
)
{
msg_
Dbg
(
p_access
,
"No key uri, no encryption"
);
return
VLC_
SUCCESS
;
msg_
Err
(
p_access
,
"No key-file, no encryption"
);
return
VLC_
EGENERIC
;
}
vlc_gcrypt_init
();
/*Setup encryption cipher*/
...
...
@@ -326,12 +333,7 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
if
(
err
)
{
msg_Err
(
p_access
,
"Openin AES Cipher failed: %s"
,
gpg_strerror
(
err
));
return
VLC_EGENERIC
;
}
if
(
unlikely
(
keyfile
==
NULL
)
)
{
msg_Err
(
p_access
,
"No key-file, no encryption"
);
free
(
key_file
);
return
VLC_EGENERIC
;
}
...
...
@@ -340,6 +342,7 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
{
msg_Err
(
p_access
,
"Unable to open keyfile %s: %m"
,
keyfile
);
free
(
keyfile
);
gcry_cipher_close
(
p_sys
->
aes_ctx
);
return
VLC_EGENERIC
;
}
free
(
keyfile
);
...
...
@@ -350,6 +353,7 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
if
(
keylen
<
16
)
{
msg_Err
(
p_access
,
"No key at least 16 octects (you provided %zd), no encryption"
,
keylen
);
gcry_cipher_close
(
p_sys
->
aes_ctx
);
return
VLC_EGENERIC
;
}
...
...
@@ -357,7 +361,7 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
if
(
err
)
{
msg_Err
(
p_access
,
"Setting AES key failed: %s"
,
gpg_strerror
(
err
));
gcry_cipher_close
(
p_sys
->
aes_ctx
);
gcry_cipher_close
(
p_sys
->
aes_ctx
);
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