+++ This bug was initially created as a clone of Bug #852755 +++ Description of problem: Memory leak in cyrus-sasl sasl2-sample-server, valgrind shows definitely lost: 11 bytes in 1 blocks. ==19720== 11 bytes in 1 blocks are definitely lost in loss record 4 of 37 ==19720== at 0x4A0610C: malloc (vg_replace_malloc.c:195) ==19720== by 0x3DBF2798E1: strdup (in /lib64/libc-2.5.so) ==19720== by 0x401580: ??? (in /usr/bin/sasl2-sample-server) ==19720== by 0x401FB8: ??? (in /usr/bin/sasl2-sample-server) ==19720== by 0x3DBF21D993: (below main) (in /lib64/libc-2.5.so) Version-Release number of selected component (if applicable): cyrus-sasl-2.1.22-7.el5_8.1 How reproducible: always Steps to Reproduce: /etc/sasl2/smtpd.conf pwcheck_method: auxprop auxprop_plugin: sasldb mech_list: DIGEST-MD5 1.saslpasswd2 -c admin 2.valgrind --leak-check=full sasl2-sample-server -p 8000 -s rcmd -m DIGEST-MD5 3.sasl2-sample-client -p 8000 -s rcmd -m DIGEST-MD5 localhost Actual results: memory leak Expected results: no memory leak Additional info:
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Created attachment 997537 [details] proposed dist git patch This is pretty harmless issue since it is not in the code of cyrus-sasl, but only in example server. Tracing it with debuginfo, we can get: ==27249== 11 bytes in 1 blocks are definitely lost in loss record 2 of 27 ==27249== at 0x4C28C0F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==27249== by 0x62A85D9: strdup (in /usr/lib64/libc-2.21.so) ==27249== by 0x10A4CB: mysasl_negotiate (server.c:216) ==27249== by 0x109D65: main (server.c:487) And using attached patch we can avoid this issue. I think this can be pushed to rawhide. Petr?
This issue was fixed by last cyrus-sasl release in f22, but I put here wrong bug id: https://admin.fedoraproject.org/updates/FEDORA-2015-3857/cyrus-sasl-2.1.26-22.fc22