On 05/09/06 16:46 +0530, Y Giridhar Appaji Nag - Debian said ...
> 
> try to figure out which package the request_login function is from and
> then send in more updates.

[snip...]
Breakpoint 7, request_login (server=0x80ad750 "mail.appaji.net", user=0x80a9f70 
"[EMAIL PROTECTED]", pass=0x80a20c0 "", port=0, ssl=0x80a9fb0 "tls1")
    at request.c:51
51              if ((s = session_find(server, user)))
$80 = 0
block freed twice

Program received signal SIGABRT, Aborted.
0x401d29e7 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0x401d29e7 in raise () from /lib/tls/libc.so.6
#1  0x401d431b in abort () from /lib/tls/libc.so.6
#2  0x40209365 in __fsetlocking () from /lib/tls/libc.so.6
#3  0x402093a4 in __libc_fatal () from /lib/tls/libc.so.6
#4  0x40214bc7 in __default_morecore () from /lib/tls/libc.so.6
#5  0x4021541c in mcheck_check_all () from /lib/tls/libc.so.6
#6  0x4020fe55 in free () from /lib/tls/libc.so.6
#7  0x0804d666 in xfree (ptr=0xbffff698) at memory.c:54
#8  0x0804a9ca in check_cert (pcert=0x80dda30,
    pmd=0xbffff688 "[EMAIL PROTECTED]",
    pmdlen=0xbffff684) at cert.c:126
#9  0x0804a7ce in get_cert (ssn=0x0) at cert.c:46
#10 0x0804fa6b in open_secure_connection (ssn=0x80a9818, protocol=0x80a9fb0 
"tls1") at socket.c:115
#11 0x0804f95a in open_connection (ssn=0x80a9818, server=0x80ad750 
"mail.appaji.net", port=993, sprotocol=0x80a9fb0 "tls1") at socket.c:67
#12 0x0804db93 in request_login (server=0x80ad750 "mail.appaji.net", 
user=0x80a9f70 "[EMAIL PROTECTED]", pass=0x80a20c0 "", port=993, ssl=0x80a9fb0 
"tls1")
    at request.c:69
#13 0x0804ada4 in ifcore_login (lua=0x809a420) at core.c:100
#14 0x40051d41 in luaD_precall (L=0x809a420, func=0x8099298) at ldo.c:260
#15 0x4006200a in luaV_execute (L=0x809a420) at lvm.c:627
#16 0x400522ae in luaD_call (L=0x809a420, func=0x809925c, nResults=-1) at 
ldo.c:313
#17 0x4004c8a6 in f_call (L=0x809a420, ud=0x0) at lapi.c:672
#18 0x40051923 in luaD_rawrunprotected (L=0x809a420, f=0x4004c880 <f_call>, 
ud=0xbffffa54) at ldo.c:88
#19 0x4005290c in luaD_pcall (L=0x809a420, func=0x4004c880 <f_call>, 
u=0xbffffa54, old_top=0, ef=0) at ldo.c:416
#20 0x4004dce8 in lua_pcall (L=0x809a420, nargs=0, nresults=0, errfunc=0) at 
lapi.c:685
#21 0x0804cfb6 in start_lua () at lua.c:61
#22 0x0804c91c in main (argc=4, argv=0xbffffb44) at imapfilter.c:114
(gdb) f 8
#8  0x0804a9ca in check_cert (pcert=0x80dda30,
    pmd=0xbffff688 "[EMAIL PROTECTED]",
    pmdlen=0xbffff684) at cert.c:126
126             xfree(certf);
(gdb) l
121             }
122
123             fclose(fd);
124             X509_free(cert);
125
126             xfree(certf);
127
128             return r;
129     }
130
(gdb) l check_cert
[snip...]
95
96              if (!exists_file(certf))
97                      return 0;
98
99              fd = fopen(certf, "r");
(gdb)
100
101             xfree(certf);
102
103             if (fd == NULL)
104                     return -1;
[snip...]
122
123             fclose(fd);
124             X509_free(cert);
125
126             xfree(certf);

So the problem here is that we are xfree-ing certf twice, once at line
101 and again on line 126.

Giridhar

-- 
Y Giridhar Appaji Nag | http://www.appaji.net/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to