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
7f7437c5
Commit
7f7437c5
authored
Apr 22, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap: memory leak
parent
a43c6c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+10
-6
No files found.
modules/services_discovery/sap.c
View file @
7f7437c5
...
...
@@ -750,12 +750,12 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
if
(
strcmp
(
psz_sdp
,
"application/sdp"
))
{
msg_Dbg
(
p_sd
,
"unsupported content type: %s"
,
psz_sdp
);
return
VLC_EGENERIC
;
goto
error
;
}
// skips content type
if
(
len
<=
clen
)
return
VLC_EGENERIC
;
goto
error
;
len
-=
clen
;
psz_sdp
+=
clen
;
...
...
@@ -765,7 +765,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_sdp
=
ParseSDP
(
VLC_OBJECT
(
p_sd
),
psz_sdp
);
if
(
p_sdp
==
NULL
)
return
VLC_EGENERIC
;
goto
error
;
p_sdp
->
psz_sdp
=
psz_sdp
;
...
...
@@ -785,7 +785,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
if
(
p_sdp
->
psz_uri
==
NULL
)
{
FreeSDP
(
p_sdp
);
return
VLC_EGENERIC
;
goto
error
;
}
for
(
i
=
0
;
i
<
p_sd
->
p_sys
->
i_announces
;
i
++
)
...
...
@@ -817,15 +817,19 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_announce
->
i_period
=
(
p_announce
->
i_period
*
(
p_announce
->
i_period_trust
-
1
)
+
(
now
-
p_announce
->
i_last
)
)
/
p_announce
->
i_period_trust
;
p_announce
->
i_last
=
now
;
}
FreeSDP
(
p_sdp
);
p_sdp
=
NULL
;
FreeSDP
(
p_sdp
);
free
(
decomp
);
return
VLC_SUCCESS
;
}
}
CreateAnnounce
(
p_sd
,
i_source
,
i_hash
,
p_sdp
);
FREENULL
(
decomp
);
free
(
decomp
);
return
VLC_SUCCESS
;
error:
free
(
decomp
);
return
VLC_EGENERIC
;
}
sap_announce_t
*
CreateAnnounce
(
services_discovery_t
*
p_sd
,
uint32_t
*
i_source
,
uint16_t
i_hash
,
...
...
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