Hey,
I noticed that mbsync crashes if I am not connected to the internet to get my mail:
```
(gdb) run -a gmail
Starting program: /usr/local/bin/mbsync -a gmail
C: 0/3 B: 0/0 M: +0/0 *0/0 #0/0 S: +0/0 *0/0 #0/0
Error: Cannot resolve server 'hudzen10.theunixzoo.co.uk': no address associated with name
Program received signal SIGSEGV, Segmentation fault.
*_libc_freeaddrinfo (ai=0x0) at /usr/src/lib/libc/net/freeaddrinfo.c:46
46 if (p->ai_canonname)
(gdb) list
41 struct addrinfo *p;
42
43 do {
44 p = ai;
45 ai = ai->ai_next;
46 if (p->ai_canonname)
47 free(p->ai_canonname);
48 free((void *)p);
49 } while (ai);
50 }
(gdb) p p
No symbol "p" in current context.
(gdb) p ai
$1 = (struct addrinfo *) 0x0
(gdb) bt
#0 *_libc_freeaddrinfo (ai=0x0) at /usr/src/lib/libc/net/freeaddrinfo.c:46
#1 0x000008aeac20f611 in socket_connect_bail (conn=0x8b0acea3158)
at /usr/ports/pobj/isync-1.2.0/isync-1.2.0/src/socket.c:523
#2 0x000008aeac20fbf8 in socket_connect (sock=0x8b0acea3158, cb=Variable "cb" is not available.
)
at /usr/ports/pobj/isync-1.2.0/isync-1.2.0/src/socket.c:396
#3 0x000008aeac2051ab in sync_chans (mvars=0x7f7ffffdf320, ent=Variable "ent" is not available.
)
at /usr/ports/pobj/isync-1.2.0/isync-1.2.0/src/main.c:775
#4 0x000008aeac2064c3 in main (argc=3, argv=0x7f7ffffdf438)
at /usr/ports/pobj/isync-1.2.0/isync-1.2.0/src/main.c:722
```
I'm using isync-1.2.0 on OpenBSD.
Cheers
Yuck, that didn't format as expected. I can't work out how to edit either.
Diff:
i believe this to be fixed by commit 89dc7592ee.
Thanks. I confirm this fixes the issue. I have sent a fix to ports@openbsd.org for review.