[Users] [Bug 3150] New: etpan_certificate_check() leaks memory

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Sun Apr 20 21:07:37 CEST 2014


http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3150

            Bug ID: 3150
           Summary: etpan_certificate_check() leaks memory
    Classification: Unclassified
           Product: Claws Mail
           Version: 3.9.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Folders/IMAP
          Assignee: users at lists.claws-mail.org
          Reporter: deweloper at wp.pl

etpan_certificate_check() allocates a temporary buffer for a copy of given
certificate but doesn't seem to free it.

534         tmp.data = malloc(len);
535         memcpy(tmp.data, certificate, len);
536         tmp.size = len;

$ grep -A 11 -B 2 etpan_certificate_check claws-mail-valgrind.log 
==00:00:02:07.848 2419== 2,669 bytes in 2 blocks are definitely lost in loss
record 18,288 of 18,550
==00:00:02:07.848 2419==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:00:02:07.848 2419==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:00:02:07.848 2419==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:00:02:07.848 2419==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:00:02:07.848 2419==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:00:02:07.848 2419==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:00:02:07.848 2419==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:00:02:07.848 2419==    by 0x80F8041: defer_check_all (main.c:313)
==00:00:02:07.848 2419==    by 0x48066261: g_timeout_dispatch (gmain.c:4451)
==00:00:02:07.848 2419==    by 0x48065555: g_main_context_dispatch
(gmain.c:3066)
==00:00:02:07.848 2419==    by 0x4806591F: g_main_context_iterate.isra.23
(gmain.c:3713)
==00:00:02:07.848 2419==    by 0x48065DC2: g_main_loop_run (gmain.c:3907)
==00:00:02:07.848 2419== 
--
==00:00:40:59.009 2967== 1,330 bytes in 1 blocks are definitely lost in loss
record 20,045 of 20,554
==00:00:40:59.009 2967==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:00:40:59.009 2967==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:00:40:59.009 2967==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:00:40:59.009 2967==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:00:40:59.009 2967==    by 0x80E64EC: imap_set_batch (imap.c:5440)
==00:00:40:59.009 2967==    by 0x80CE460: folder_item_set_batch (folder.c:4637)
==00:00:40:59.009 2967==    by 0x80CE526: syncronize_flags (folder.c:1953)
==00:00:40:59.009 2967==    by 0x80CF312: folder_item_scan_full (folder.c:2346)
==00:00:40:59.009 2967==    by 0x80D0F67: folder_item_scan (folder.c:2507)
==00:00:40:59.009 2967==    by 0x80DC9A6: folderview_check_new
(folderview.c:1190)
==00:00:40:59.009 2967==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:00:40:59.009 2967==    by 0x81D1AEF: toolbar_inc_all_cb (toolbar.c:2667)
==00:00:40:59.009 2967== 
--
==00:00:40:59.012 2967== 6,050 bytes in 5 blocks are definitely lost in loss
record 20,362 of 20,554
==00:00:40:59.012 2967==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:00:40:59.012 2967==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:00:40:59.012 2967==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:00:40:59.012 2967==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:00:40:59.012 2967==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:00:40:59.012 2967==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:00:40:59.012 2967==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:00:40:59.012 2967==    by 0x81D1AEF: toolbar_inc_all_cb (toolbar.c:2667)
==00:00:40:59.012 2967==    by 0x48187548: g_cclosure_marshal_VOID__VOIDv
(gmarshal.c:115)
==00:00:40:59.012 2967==    by 0x48185A25: _g_closure_invoke_va
(gclosure.c:840)
==00:00:40:59.012 2967==    by 0x4819FA82: g_signal_emit_valist
(gsignal.c:3238)
==00:00:40:59.012 2967==    by 0x481A0B80: g_signal_emit_by_name
(gsignal.c:3426)
==00:00:40:59.012 2967== 
--
==00:00:40:59.013 2967== 8,719 bytes in 7 blocks are definitely lost in loss
record 20,414 of 20,554
==00:00:40:59.013 2967==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:00:40:59.013 2967==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:00:40:59.013 2967==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:00:40:59.013 2967==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:00:40:59.013 2967==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:00:40:59.013 2967==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:00:40:59.013 2967==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:00:40:59.013 2967==    by 0x80F8041: defer_check_all (main.c:313)
==00:00:40:59.013 2967==    by 0x48066261: g_timeout_dispatch (gmain.c:4451)
==00:00:40:59.013 2967==    by 0x48065555: g_main_context_dispatch
(gmain.c:3066)
==00:00:40:59.013 2967==    by 0x4806591F: g_main_context_iterate.isra.23
(gmain.c:3713)
==00:00:40:59.013 2967==    by 0x48065DC2: g_main_loop_run (gmain.c:3907)
==00:00:40:59.013 2967== 
--
==00:02:51:16.969 2406== 1,330 bytes in 1 blocks are definitely lost in loss
record 19,268 of 19,698
==00:02:51:16.969 2406==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:02:51:16.970 2406==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:02:51:16.970 2406==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:02:51:16.970 2406==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:02:51:16.970 2406==    by 0x80E64EC: imap_set_batch (imap.c:5440)
==00:02:51:16.970 2406==    by 0x80CE460: folder_item_set_batch (folder.c:4637)
==00:02:51:16.970 2406==    by 0x80CE526: syncronize_flags (folder.c:1953)
==00:02:51:16.970 2406==    by 0x80CF312: folder_item_scan_full (folder.c:2346)
==00:02:51:16.970 2406==    by 0x80D0F67: folder_item_scan (folder.c:2507)
==00:02:51:16.970 2406==    by 0x80DC9A6: folderview_check_new
(folderview.c:1190)
==00:02:51:16.970 2406==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:02:51:16.970 2406==    by 0x81D1AEF: toolbar_inc_all_cb (toolbar.c:2667)
==00:02:51:16.970 2406== 
--
==00:02:51:16.972 2406== 6,050 bytes in 5 blocks are definitely lost in loss
record 19,568 of 19,698
==00:02:51:16.972 2406==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:02:51:16.972 2406==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:02:51:16.972 2406==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:02:51:16.972 2406==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:02:51:16.972 2406==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:02:51:16.972 2406==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:02:51:16.972 2406==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:02:51:16.972 2406==    by 0x81D1AEF: toolbar_inc_all_cb (toolbar.c:2667)
==00:02:51:16.972 2406==    by 0x48187548: g_cclosure_marshal_VOID__VOIDv
(gmarshal.c:115)
==00:02:51:16.972 2406==    by 0x48185A25: _g_closure_invoke_va
(gclosure.c:840)
==00:02:51:16.972 2406==    by 0x4819FA82: g_signal_emit_valist
(gsignal.c:3238)
==00:02:51:16.972 2406==    by 0x481A0B80: g_signal_emit_by_name
(gsignal.c:3426)
==00:02:51:16.972 2406== 
--
==00:02:51:16.972 2406== 8,719 bytes in 7 blocks are definitely lost in loss
record 19,610 of 19,698
==00:02:51:16.972 2406==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:02:51:16.972 2406==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:02:51:16.972 2406==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:02:51:16.972 2406==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:02:51:16.972 2406==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:02:51:16.972 2406==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:02:51:16.973 2406==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:02:51:16.973 2406==    by 0x80F8041: defer_check_all (main.c:313)
==00:02:51:16.973 2406==    by 0x48066261: g_timeout_dispatch (gmain.c:4451)
==00:02:51:16.973 2406==    by 0x48065555: g_main_context_dispatch
(gmain.c:3066)
==00:02:51:16.973 2406==    by 0x4806591F: g_main_context_iterate.isra.23
(gmain.c:3713)
==00:02:51:16.973 2406==    by 0x48065DC2: g_main_loop_run (gmain.c:3907)
==00:02:51:16.973 2406== 
==00:02:51:16.973 2406== 8,719 bytes in 7 blocks are definitely lost in loss
record 19,611 of 19,698
==00:02:51:16.973 2406==    at 0x4006B11: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==00:02:51:16.973 2406==    by 0x822E9F9: etpan_certificate_check
(imap-thread.c:534)
==00:02:51:16.973 2406==    by 0x82317B4: imap_threaded_connect_ssl
(imap-thread.c:648)
==00:02:51:16.973 2406==    by 0x80E5C62: imap_session_get (imap.c:1122)
==00:02:51:16.973 2406==    by 0x80E7697: imap_scan_required (imap.c:4691)
==00:02:51:16.973 2406==    by 0x80DC8EE: folderview_check_new
(folderview.c:1186)
==00:02:51:16.973 2406==    by 0x80F7032: inc_all_account_mail (inc.c:360)
==00:02:51:16.973 2406==    by 0x80F71F9: inc_autocheck_func (inc.c:1493)
==00:02:51:16.973 2406==    by 0x48066261: g_timeout_dispatch (gmain.c:4451)
==00:02:51:16.973 2406==    by 0x48065555: g_main_context_dispatch
(gmain.c:3066)
==00:02:51:16.973 2406==    by 0x4806591F: g_main_context_iterate.isra.23
(gmain.c:3713)
==00:02:51:16.973 2406==    by 0x48065DC2: g_main_loop_run (gmain.c:3907)
==00:02:51:16.973 2406== 

claws-mail-3.9.3-1.fc20.i686

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Users mailing list