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
8f467369
Commit
8f467369
authored
Apr 01, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- invalid free removed (might be the reason why sap discovery was so unstable)
- 7 memleaks fixed
parent
4d8ff80c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+11
-4
No files found.
modules/services_discovery/sap.c
View file @
8f467369
...
@@ -461,6 +461,7 @@ static void Close( vlc_object_t *p_this )
...
@@ -461,6 +461,7 @@ static void Close( vlc_object_t *p_this )
{
{
net_Close
(
p_sys
->
pi_fd
[
i
]
);
net_Close
(
p_sys
->
pi_fd
[
i
]
);
}
}
FREE
(
p_sys
->
pi_fd
);
if
(
config_GetInt
(
p_sd
,
"sap-cache"
)
)
if
(
config_GetInt
(
p_sd
,
"sap-cache"
)
)
{
{
...
@@ -471,6 +472,7 @@ static void Close( vlc_object_t *p_this )
...
@@ -471,6 +472,7 @@ static void Close( vlc_object_t *p_this )
{
{
RemoveAnnounce
(
p_sd
,
p_sys
->
pp_announces
[
i
]
);
RemoveAnnounce
(
p_sd
,
p_sys
->
pp_announces
[
i
]
);
}
}
FREE
(
p_sys
->
pp_announces
);
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_sd
,
VLC_OBJECT_PLAYLIST
,
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_sd
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
...
@@ -819,6 +821,7 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
...
@@ -819,6 +821,7 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
if
(
!
p_item
)
if
(
!
p_item
)
{
{
free
(
p_sap
);
return
NULL
;
return
NULL
;
}
}
...
@@ -846,7 +849,6 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
...
@@ -846,7 +849,6 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
if
(
!
p_playlist
)
if
(
!
p_playlist
)
{
{
msg_Err
(
p_sd
,
"playlist not found"
);
msg_Err
(
p_sd
,
"playlist not found"
);
FREE
(
psz_value
);
free
(
p_sap
);
free
(
p_sap
);
return
NULL
;
return
NULL
;
}
}
...
@@ -864,13 +866,11 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
...
@@ -864,13 +866,11 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
p_child
=
playlist_NodeCreate
(
p_playlist
,
VIEW_CATEGORY
,
p_child
=
playlist_NodeCreate
(
p_playlist
,
VIEW_CATEGORY
,
psz_grp
,
p_sd
->
p_sys
->
p_node
);
psz_grp
,
p_sd
->
p_sys
->
p_node
);
free
(
psz_grp
);
free
(
psz_grp
);
free
(
psz_value
);
}
}
else
else
{
{
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
msg_Err
(
p_sd
,
"out of memory"
);
msg_Err
(
p_sd
,
"out of memory"
);
free
(
psz_value
);
free
(
p_sap
);
free
(
p_sap
);
return
NULL
;
return
NULL
;
}
}
...
@@ -1296,6 +1296,7 @@ static char *convert_from_utf8( struct services_discovery_t *p_sd,
...
@@ -1296,6 +1296,7 @@ static char *convert_from_utf8( struct services_discovery_t *p_sd,
if
(
ret
==
(
size_t
)(
-
1
)
||
i_in
)
if
(
ret
==
(
size_t
)(
-
1
)
||
i_in
)
{
{
msg_Warn
(
p_sd
,
"Failed to convert
\"
%s
\"
from UTF-8"
,
psz_unicode
);
msg_Warn
(
p_sd
,
"Failed to convert
\"
%s
\"
from UTF-8"
,
psz_unicode
);
free
(
psz_local
);
return
strdup
(
psz_unicode
);
return
strdup
(
psz_unicode
);
}
}
*
psz_out
=
'\0'
;
*
psz_out
=
'\0'
;
...
@@ -1410,6 +1411,8 @@ static void FreeSDP( sdp_t *p_sdp )
...
@@ -1410,6 +1411,8 @@ static void FreeSDP( sdp_t *p_sdp )
FREE
(
p_sdp
->
psz_connection
);
FREE
(
p_sdp
->
psz_connection
);
FREE
(
p_sdp
->
psz_media
);
FREE
(
p_sdp
->
psz_media
);
FREE
(
p_sdp
->
psz_uri
);
FREE
(
p_sdp
->
psz_uri
);
FREE
(
p_sdp
->
psz_username
);
FREE
(
p_sdp
->
psz_network_type
);
FREE
(
p_sdp
->
psz_address
);
FREE
(
p_sdp
->
psz_address
);
FREE
(
p_sdp
->
psz_address_type
);
FREE
(
p_sdp
->
psz_address_type
);
...
@@ -1434,7 +1437,11 @@ static int RemoveAnnounce( services_discovery_t *p_sd,
...
@@ -1434,7 +1437,11 @@ static int RemoveAnnounce( services_discovery_t *p_sd,
if
(
p_announce
->
p_sdp
)
FreeSDP
(
p_announce
->
p_sdp
);
if
(
p_announce
->
p_sdp
)
FreeSDP
(
p_announce
->
p_sdp
);
if
(
!
p_playlist
)
return
VLC_EGENERIC
;
if
(
!
p_playlist
)
{
free
(
p_announce
);
return
VLC_EGENERIC
;
}
if
(
p_announce
->
p_item
)
if
(
p_announce
->
p_item
)
{
{
...
...
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