Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in cons_alert() #1427

Closed
pasis opened this issue Oct 7, 2020 · 1 comment
Closed

Memory leak in cons_alert() #1427

pasis opened this issue Oct 7, 2020 · 1 comment

Comments

@pasis
Copy link
Member

pasis commented Oct 7, 2020

==12717== 8 bytes in 1 blocks are definitely lost in loss record 62 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x51B8BFA: strdup (in /lib64/libc-2.32.so)
==12717==    by 0x15DBCB: cons_alert (in /usr/bin/profanity)
==12717==    by 0x15DCD5: cons_show_error (in /usr/bin/profanity)
==12717==    by 0x14EC71: sv_ev_lost_connection (in /usr/bin/profanity)
==12717==    by 0x13CE48: session_lost_connection (in /usr/bin/profanity)
==12717==    by 0x13D49A: _connection_handler (in /usr/bin/profanity)
==12717==    by 0x50FA836: xmpp_run_once (event.c:289)
==12717==    by 0x13D6DE: connection_check_events (in /usr/bin/profanity)
==12717==    by 0x137C4C: prof_run (in /usr/bin/profanity)
==12717==    by 0x13394C: main (in /usr/bin/profanity)
==12717== 
==12717== 8 bytes in 1 blocks are definitely lost in loss record 63 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x51B8BFA: strdup (in /lib64/libc-2.32.so)
==12717==    by 0x15DBCB: cons_alert (in /usr/bin/profanity)
==12717==    by 0x15DCD5: cons_show_error (in /usr/bin/profanity)
==12717==    by 0x14EC71: sv_ev_lost_connection (in /usr/bin/profanity)
==12717==    by 0x13CE48: session_lost_connection (in /usr/bin/profanity)
==12717==    by 0x137C51: prof_run (in /usr/bin/profanity)
==12717==    by 0x13394C: main (in /usr/bin/profanity)
==12717== 
==12717== 16 bytes in 2 blocks are definitely lost in loss record 416 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x51B8BFA: strdup (in /lib64/libc-2.32.so)
==12717==    by 0x15DBCB: cons_alert (in /usr/bin/profanity)
==12717==    by 0x15DCD5: cons_show_error (in /usr/bin/profanity)
==12717==    by 0x14EC71: sv_ev_lost_connection (in /usr/bin/profanity)
==12717==    by 0x13CE48: session_lost_connection (in /usr/bin/profanity)
==12717==    by 0x13D49A: _connection_handler (in /usr/bin/profanity)
==12717==    by 0x5CCD982: doContent (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x5CCE64B: contentProcessor (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x5CD0C3B: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x50FA9E3: xmpp_run_once (event.c:276)
==12717==    by 0x13D6DE: connection_check_events (in /usr/bin/profanity)
==12717== 
==12717== 24 bytes in 3 blocks are definitely lost in loss record 511 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x51B8BFA: strdup (in /lib64/libc-2.32.so)
==12717==    by 0x15DBCB: cons_alert (in /usr/bin/profanity)
==12717==    by 0x15DCD5: cons_show_error (in /usr/bin/profanity)
==12717==    by 0x155A1F: ui_handle_recipient_error (in /usr/bin/profanity)
==12717==    by 0x145468: _presence_handler (in /usr/bin/profanity)
==12717==    by 0x50FB09C: handler_fire_stanza (handler.c:121)
==12717==    by 0x50F7BFA: _handle_stream_stanza (conn.c:1253)
==12717==    by 0x51059BE: _end_element (parser_expat.c:229)
==12717==    by 0x5CCD982: doContent (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x5CCE64B: contentProcessor (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x5CD0C3B: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.12)
==12717== 
==12717== 32 bytes in 1 blocks are definitely lost in loss record 692 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x4F29DA8: _rl_malloc (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F1D08E: rl_add_undo (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F1FF33: rl_insert_text (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F20F8D: _rl_insert_char (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F21AE4: rl_insert (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F04276: _rl_dispatch_subseq (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F0482C: readline_internal_char (in /lib64/libreadline.so.8.0)
==12717==    by 0x4F1EDF4: rl_callback_read_char (in /lib64/libreadline.so.8.0)
==12717==    by 0x15A924: inp_readline (in /usr/bin/profanity)
==12717==    by 0x137C79: prof_run (in /usr/bin/profanity)
==12717==    by 0x13394C: main (in /usr/bin/profanity)
==12717== 
==12717== 32 bytes in 4 blocks are definitely lost in loss record 693 of 1,477
==12717==    at 0x483879F: malloc (vg_replace_malloc.c:307)
==12717==    by 0x51B8BFA: strdup (in /lib64/libc-2.32.so)
==12717==    by 0x15DBCB: cons_alert (in /usr/bin/profanity)
==12717==    by 0x157063: ui_handle_login_account_success (in /usr/bin/profanity)
==12717==    by 0x14EA4C: sv_ev_login_account_success (in /usr/bin/profanity)
==12717==    by 0x13CCD8: session_login_success (in /usr/bin/profanity)
==12717==    by 0x50F5EC1: _handle_bind (auth.c:1016)
==12717==    by 0x50FAF6C: handler_fire_stanza (handler.c:80)
==12717==    by 0x50F7BFA: _handle_stream_stanza (conn.c:1253)
==12717==    by 0x51059BE: _end_element (parser_expat.c:229)
==12717==    by 0x5CCD982: doContent (in /usr/lib64/libexpat.so.1.6.12)
==12717==    by 0x5CCE64B: contentProcessor (in /usr/lib64/libexpat.so.1.6.12)
==12717== 
==12717== LEAK SUMMARY:
==12717==    definitely lost: 120 bytes in 12 blocks
==12717==    indirectly lost: 0 bytes in 0 blocks
==12717==      possibly lost: 2,640 bytes in 27 blocks
==12717==    still reachable: 2,345,173 bytes in 7,331 blocks
==12717==                       of which reachable via heuristic:
==12717==                         length64           : 728 bytes in 14 blocks
==12717==                         newarray           : 1,728 bytes in 28 blocks
==12717==         suppressed: 0 bytes in 0 blocks

Environment

Profanity, version 0.9.5dev.HEAD.3d082bfb
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2020 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Disabled
PGP support: Disabled
OMEMO support: Disabled
C plugins: Disabled
Python plugins: Disabled
GTK icons: Disabled
@jubalh jubalh closed this as completed in f12161f Oct 7, 2020
@jubalh
Copy link
Member

jubalh commented Oct 7, 2020

Thanks! Should be ok now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants