Skip to content

Commit

Permalink
core: fix freeaddrinfo coredump
Browse files Browse the repository at this point in the history
> #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

(cherry picked from commit 71502d2)
  • Loading branch information
linuxmaniac committed Jun 22, 2022
1 parent d456f07 commit 315781e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/dprint.c
Expand Up @@ -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];

Expand Down

0 comments on commit 315781e

Please sign in to comment.