... | ... |
@@ -2,19 +2,22 @@ $Id$ |
2 | 2 |
|
3 | 3 |
( - todo, x - done) |
4 | 4 |
|
5 |
-- backport tcp conn id fix to stable |
|
6 | 5 |
- change len_gt into and expr (e.g msg:len). |
7 | 6 |
- sipit: uri == myself doesn't match tls port = 5061 |
8 | 7 |
- sipit: fix check_self & *_alias to work with tcp & tls |
9 | 8 |
- sipit: fix ipv6 references in check_self |
10 | 9 |
- regex subst on uris? |
11 |
-- port receive.c pre_script_cb fix from stable |
|
10 |
+x port receive.c pre_script_cb fix from stable |
|
12 | 11 |
- extend alias to include port numbers : |
13 | 12 |
something like alias= foo1.bar:5080 foo2.bar foo3.bar:* |
14 | 13 |
- extend listen and alias to include port numbers and protocol: |
15 | 14 |
tcp foo.bar:5063, udp foo.bar:5062, foo2.bar |
16 | 15 |
|
17 | 16 |
release: |
17 |
+- backport: tcp conn id fix to stable + destroy_tcp |
|
18 |
+- backport: acc mem. leak fixes |
|
19 |
+- backport: dns mem. leak fixes (resolve.[ch]) |
|
20 |
+- backport: id_builder receive_msg mem. leak (receive.c) |
|
18 | 21 |
- change tcp timeouts to 2 or 3 min? |
19 | 22 |
x check via ipv6 fixes and backport to stable |
20 | 23 |
x fix kill(0, SIGTERM) on startup error (will kill also the launching shell |
... | ... |
@@ -1186,7 +1186,8 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg, |
1186 | 1186 |
if ((id_buf=id_builder(msg, &id_len))==0){ |
1187 | 1187 |
LOG(L_ERR, "ERROR: build_req_buf_from_sip_req:" |
1188 | 1188 |
" id_builder failed\n"); |
1189 |
- goto error01; /* free everything */ |
|
1189 |
+ goto error00; /* we don't need to free anything, |
|
1190 |
+ nothing alloc'ed yet*/ |
|
1190 | 1191 |
} |
1191 | 1192 |
DBG("build_req_from_req: id added: <%.*s>, rcv proto=%d\n", |
1192 | 1193 |
(int)id_len, id_buf, msg->rcv.proto); |
... | ... |
@@ -1315,7 +1316,7 @@ skip_clen: |
1315 | 1316 |
* parse_headers is called from clen_builder */ |
1316 | 1317 |
anchor=anchor_lump(&(msg->add_rm), msg->unparsed-buf, 0, |
1317 | 1318 |
HDR_CONTENTLENGTH); |
1318 |
- if (anchor==0) goto error04; /* free clen_buf*/ |
|
1319 |
+ if (anchor==0) goto error04; /* free clen_buf */ |
|
1319 | 1320 |
if (insert_new_lump_after(anchor, clen_buf, clen_len, |
1320 | 1321 |
HDR_CONTENTLENGTH)==0) |
1321 | 1322 |
goto error04; /* free clen_buf*/ |
... | ... |
@@ -1366,13 +1367,15 @@ skip_clen: |
1366 | 1367 |
#endif |
1367 | 1368 |
|
1368 | 1369 |
*returned_len=new_len; |
1370 |
+ /* cleanup */ |
|
1371 |
+#ifdef USE_TCP |
|
1372 |
+ if (id_buf) pkg_free(id_buf); /* it's not in a lump => we don't need it |
|
1373 |
+ anymore */ |
|
1374 |
+#endif |
|
1369 | 1375 |
return new_buf; |
1370 | 1376 |
|
1371 | 1377 |
error01: |
1372 |
- pkg_free(line_buf); |
|
1373 |
-#ifdef USE_TCP |
|
1374 |
- if (id_buf) pkg_free(id_buf); |
|
1375 |
-#endif |
|
1378 |
+ if (line_buf) pkg_free(line_buf); |
|
1376 | 1379 |
error02: |
1377 | 1380 |
if (received_buf) pkg_free(received_buf); |
1378 | 1381 |
error03: |
... | ... |
@@ -1382,6 +1385,9 @@ error04: |
1382 | 1385 |
if (clen_buf) pkg_free(clen_buf); |
1383 | 1386 |
#endif |
1384 | 1387 |
error00: |
1388 |
+#ifdef USE_TCP |
|
1389 |
+ if (id_buf) pkg_free(id_buf); |
|
1390 |
+#endif |
|
1385 | 1391 |
*returned_len=0; |
1386 | 1392 |
return 0; |
1387 | 1393 |
} |
... | ... |
@@ -529,6 +529,7 @@ struct hostent* sip_resolvehost(str* name, unsigned short* port, int proto) |
529 | 529 |
return he; |
530 | 530 |
} |
531 | 531 |
} |
532 |
+ if (head) free_rdata_list(head); /*clean up*/ |
|
532 | 533 |
DBG("sip_resolvehost: not SRV record found for %.*s," |
533 | 534 |
" trying 'normal' lookup...\n", name->len, name->s); |
534 | 535 |
} |