In osaf_get_group_list(), in few places the function return without calling endgrent() which causes a memory leak when a service is daemonized.
This memory leak does not have a significant impact on services since it's called only once and a small amount of memory is allocated.
==8708== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 97 of 180
==8708== at 0x4C29F09: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==8708== by 0x6175E52: nss_parse_service_list (in /lib64/libc-2.11.3.so)
==8708== by 0x61765CE: nss_database_lookup (in /lib64/libc-2.11.3.so)
==8708== by 0x680448F: ???
==8708== by 0x68047CC: ???
==8708== by 0x6176C81: nss_setent (in /lib64/libc-2.11.3.so)
==8708== by 0x612F74B: setgrent (in /lib64/libc-2.11.3.so)
==8708== by 0x4E4BEC8: osaf_get_group_list (osaf_secutil.c:361)
==8708== by 0x4E4B263: daemonize (daemon.c:337)
==8708== by 0x41A1CD: main (immnd_main.c:262)
https://sourceforge.net/p/opensaf/mailman/message/34407560/
opensaf-4.6.x:
changeset: 6773:f60e6bf49df2
tag: tip
parent: 6771:7a8c2be1c349
user: Zoran Milinkovic zoran.milinkovic@ericsson.com
date: Wed Aug 26 17:17:59 2015 +0200
summary: osaf: fix memory leak in daemonize [#1461]
default(4.7):
changeset: 6772:9520839d84d5
branch: opensaf-4.6.x
parent: 6769:ceaef51adc43
user: Zoran Milinkovic zoran.milinkovic@ericsson.com
date: Wed Aug 26 17:17:59 2015 +0200
summary: osaf: fix memory leak in daemonize [#1461]
Related
Tickets:
#1461