projects
/
platform
/
upstream
/
libnice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86a7499
)
agent: Avoid leak on programming error
author
Olivier Crête
<olivier.crete@collabora.com>
Mon, 3 May 2021 21:01:59 +0000
(17:01 -0400)
committer
Olivier Crête
<olivier.crete@collabora.com>
Mon, 3 May 2021 22:42:43 +0000
(18:42 -0400)
Even if the agent is invalid, don't leak.
This makes coverity a little happier.
agent/agent.c
patch
|
blob
|
history
diff --git
a/agent/agent.c
b/agent/agent.c
index
a510be5
..
75e2275
100644
(file)
--- a/
agent/agent.c
+++ b/
agent/agent.c
@@
-6676,11
+6676,13
@@
_generate_stream_sdp (NiceAgent *agent, NiceStream *stream,
NICEAPI_EXPORT gchar *
nice_agent_generate_local_sdp (NiceAgent *agent)
{
- GString *
sdp = g_string_new (NULL)
;
+ GString *
sdp
;
GSList *i;
g_return_val_if_fail (NICE_IS_AGENT (agent), NULL);
+ sdp = g_string_new (NULL);
+
agent_lock (agent);
for (i = agent->streams; i; i = i->next) {