Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
138
Issues
138
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
f8245909
Commit
f8245909
authored
Sep 30, 2020
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: add missing free and avoid memory leaks
Change-Id: I6cb59c613702348b33b537cf29680d6359b18d4d
parent
e5b55322
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
contrib/src/pjproject/0002-rfc2466.patch
contrib/src/pjproject/0002-rfc2466.patch
+14
-17
No files found.
contrib/src/pjproject/0002-rfc2466.patch
View file @
f8245909
From 753c3c04da7465622d6f0ce2efebdf428fba536f Mon Sep 17 00:00:00 2001
From: jrun <darwinskernel@gmail.com>
Date: Thu, 27 Feb 2020 11:34:40 -0500
Subject: [PATCH 2/9] rfc2466
---
pjnath/src/pjnath/ice_session.c | 170 ++++++++++++++++++++++++++++++++
1 file changed, 170 insertions(+)
pjnath/src/pjnath/ice_session.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 176 insertions(+)
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index
960c55156..a50c21c9
4 100644
index
2a4125bc5..542acf7b
4 100644
--- a/pjnath/src/pjnath/ice_session.c
+++ b/pjnath/src/pjnath/ice_session.c
@@ -
30,6 +30
,21 @@
@@ -
29,6 +29
,21 @@
#include <pj/rand.h>
#include <pj/string.h>
...
...
@@ -33,7 +27,7 @@ index 960c55156..a50c21c94 100644
/* String names for candidate types */
static const char *cand_type_names[] =
{
@@ -7
12,6 +727,138
@@
static pj_uint32_t CALC_CAND_PRIO(pj_ice_sess *ice,
@@ -7
03,6 +718,144
@@
static pj_uint32_t CALC_CAND_PRIO(pj_ice_sess *ice,
#endif
}
...
...
@@ -97,6 +91,7 @@ index 960c55156..a50c21c94 100644
+ rtn = recv(fd, read_buffer, pagesize, 0);
+ if(rtn < 0) {
+ perror ("recv(): ");
+ free(deprecatedAddrs);
+ return;
+ }
+
...
...
@@ -105,6 +100,7 @@ index 960c55156..a50c21c94 100644
+
+ if (nlmsg_len < sizeof (struct nlmsghdr)) {
+ perror ("Received an uncomplete netlink packet");
+ free(deprecatedAddrs);
+ return;
+ }
+
...
...
@@ -137,6 +133,7 @@ index 960c55156..a50c21c94 100644
+ (idx + 256)*sizeof(char)*PJ_INET6_ADDRSTRLEN);
+ if (newDeprecated == NULL) {
+ perror("realloc error: abort");
+ free(deprecatedAddrs);
+ return;
+ }
+ deprecatedAddrs = newDeprecated;
...
...
@@ -165,16 +162,19 @@ index 960c55156..a50c21c94 100644
+ *addresses = final;
+ } else {
+ perror("realloc error: abort");
+ free(deprecatedAddrs);
+ }
+ } else {
+ free(deprecatedAddrs);
+ }
+#endif
+}
/*
* Add ICE candidate
@@ -7
29,6 +876
,29 @@
PJ_DEF(pj_status_t) pj_ice_sess_add_cand(pj_ice_sess *ice,
unsigned *p_cand_id
,
pj_ice_cand_transport transport
)
@@ -7
19,6 +872
,29 @@
PJ_DEF(pj_status_t) pj_ice_sess_add_cand(pj_ice_sess *ice,
int addr_len
,
unsigned *p_cand_id
)
{
+ /**
+ * RFC 2466: an ip address can have the status DEPRECATED and SHOULD NOT
...
...
@@ -202,6 +202,3 @@ index 960c55156..a50c21c94 100644
pj_ice_sess_cand *lcand;
pj_status_t status = PJ_SUCCESS;
char address[PJ_INET6_ADDRSTRLEN];
--
2.24.1
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