- **status**: review --> fixed
- **Comment**:
commit a1fcc05d5efc497c2aab3ec52ff697167c43c224
Author: dat.tq.phan <dat.tq.p...@dektech.com.au>
Date: Tue Mar 28 10:22:14 2023 +0700
rde: fix errors reported by Valgrind [#3333]
Fix memleak detected by Valgrind when receive rde message.
Also fix the uninitialized value(s).
---
** [tickets:#3333] rde: Valgrind reported errors**
**Status:** fixed
**Milestone:** 5.23.07
**Created:** Tue Mar 28, 2023 02:51 AM UTC by PhanTranQuocDat
**Last Updated:** Thu Apr 20, 2023 07:14 AM UTC
**Owner:** PhanTranQuocDat
Valgrind detected memleak when receive rde message:
==196== 177,584 (1,232 direct, 176,352 indirect) bytes in 22 blocks are
definitely lost in loss record 81 of 81
==196== at 0x483B7F3: malloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x48ADCF0: sysf_alloc_pkt (sysf_mem.c:429)
==196== by 0x489CD15: ncs_enc_init_space_pp (hj_ubaid.c:144)
==196== by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1454)
==196== by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1442)
==196== by 0x48CC0C0: mdtm_process_recv_message_common (mds_dt_common.c:544)
==196== by 0x48CC5F8: mdtm_process_recv_data (mds_dt_common.c:1126)
==196== by 0x48D71E7: mdtm_process_recv_events (mds_dt_tipc.c:1144)
==196== by 0x4B5A608: start_thread (pthread_create.c:477)
==196== by 0x4C94132: clone (clone.S:95)
Also, uninitialized value(s):
==351== Conditional jump or move depends on uninitialised value(s)
==351== at 0x50541FB: ava_fill_comp_reg_msg (ava_mds.cc:1310)
==351== by 0x50497D0: AmfAgent::ComponentRegister(unsigned long long,
SaNameT const*, SaNameT const*) (amf_agent.cc:559)
==351== by 0x10E940: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:186)
==351== by 0x10DAAE: main (rde_main.cc:458)
==351== Uninitialised value was created by a stack allocation
==351== at 0x10E743: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:140)
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets