mirror of https://github.com/sipwise/kamailio.git
Change-Id: I617e7d8d3c10b7d692e5f8a4fd633fe9c1e23a04
(cherry picked from commit 9f8e5919ca)
mr10.5.2
parent
1178f9bdeb
commit
0afc8d397f
@ -0,0 +1,30 @@
|
||||
From: Victor Seva <vseva@sipwise.com>
|
||||
Date: Wed, 22 Jun 2022 12:26:46 +0200
|
||||
Subject: core: fix freeaddrinfo coredump
|
||||
|
||||
> #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
||||
> #1 0x00007fbb5e515537 in __GI_abort () at abort.c:79
|
||||
> #2 0x00007fbb5e56e768 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fbb5e67ce2d "%s\n") at ../sysdeps/posix/libc_fatal.c:155
|
||||
> #3 0x00007fbb5e575a5a in malloc_printerr (str=str@entry=0x7fbb5e67b05a "free(): invalid pointer") at malloc.c:5347
|
||||
> #4 0x00007fbb5e576c14 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4173
|
||||
> #5 0x00007fbb5e5d8da0 in __GI_freeaddrinfo (ai=ai@entry=0x7fbb5e83ba10) at ../sysdeps/posix/getaddrinfo.c:2520
|
||||
> #6 0x000055ba099dcd0b in log_init () at core/dprint.c:482
|
||||
> #7 0x000055ba09970d7a in main (argc=10, argv=0x7ffde85a1788) at main.c:2055
|
||||
---
|
||||
src/core/dprint.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/dprint.c b/src/core/dprint.c
|
||||
index 9b01dc8..f4780bb 100644
|
||||
--- a/src/core/dprint.c
|
||||
+++ b/src/core/dprint.c
|
||||
@@ -459,7 +459,8 @@ static str log_prefix_str = STR_NULL;
|
||||
|
||||
void log_init(void)
|
||||
{
|
||||
- struct addrinfo hints, *info;
|
||||
+ struct addrinfo hints;
|
||||
+ struct addrinfo *info = NULL;
|
||||
int gai_result;
|
||||
char hostname[1024];
|
||||
|
||||
Loading…
Reference in new issue