about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2020-02-23 08:49:29 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2020-02-23 08:51:36 +0200
commit6c649a9de80589d51bc267874997c1cf1df0f48b (patch)
tree809441239d5d4ee77f502c4b1d44dfef3dd7a438 /src/ui
parentc520c3d3c39e079bb6370f5490fa8d24c865feca (diff)
downloadprofani-tty-6c649a9de80589d51bc267874997c1cf1df0f48b.tar.gz
Fix memory leak of presence object
The memory leak happens when a presence is received for a MUC room. The
JID is not present in the roster, so updating its status is ignored. We
have to free resource in this case, because it has no owner and is lost
otherwise.

==25736== 47 (32 direct, 15 indirect) bytes in 1 blocks are definitely lost in loss record 1,625 of 3,399
==25736==    at 0x4A330FF: malloc (vg_replace_malloc.c:309)
==25736==    by 0x13A962: resource_new (resource.c:47)
==25736==    by 0x145501: _available_handler (presence.c:665)
==25736==    by 0x145501: _presence_handler (presence.c:399)
==25736==    by 0x145501: _presence_handler (presence.c:358)
==25736==    by 0x80D5F34: handler_fire_stanza (in /usr/lib64/libstrophe.so.0.0.0)
==25736==    by 0x80D2B49: _handle_stream_stanza (in /usr/lib64/libstrophe.so.0.0.0)
==25736==    by 0x80E15CE: _end_element (in /usr/lib64/libstrophe.so.0.0.0)
==25736==    by 0x843EE9B: doContent (in /usr/lib64/libexpat.so.1.6.10)
==25736==    by 0x843F94B: contentProcessor (in /usr/lib64/libexpat.so.1.6.10)
==25736==    by 0x8441E77: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.10)
==25736==    by 0x80D586B: xmpp_run_once (in /usr/lib64/libstrophe.so.0.0.0)
==25736==    by 0x13E07E: connection_check_events (connection.c:119)
==25736==    by 0x13869C: prof_run (profanity.c:129)

Fixes #1279.
Diffstat (limited to 'src/ui')
0 files changed, 0 insertions, 0 deletions