Menu

#1848 imm: Memory leak in ImmSearchOp::nextResult

4.7.2
fixed
None
defect
imm
nd
major
2016-06-01
2016-05-24
Hung Nguyen
No

Reproduce:

Use immlist on an object with runtime attributes and OI attached.
Kill immlist before receiving the response from OI.

root@SC-1:~# immlist safSu=SC-1,safSg=NoRed,safApp=OpenSAF & kill -9 `pidof immlist`
==23745== 644 (24 direct, 620 indirect) bytes in 1 blocks are definitely lost in loss record 154 of 208
==23745==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23745==    by 0x42104E: ImmSearchOp::nextResult(ImmsvOmRspSearchNext**, void**, std::list<SearchAttribute, std::allocator<SearchAttribute> >**) (ImmSearchOp.cc:124)
==23745==    by 0x42AD55: immModel_nextResult (ImmModel.cc:1514)
==23745==    by 0x40E216: immnd_evt_proc_search_next (immnd_evt.c:1526)
==23745==    by 0x40EA86: immnd_evt_proc_accessor_get (immnd_evt.c:1861)
==23745==    by 0x4187C2: immnd_process_evt (immnd_evt.c:609)
==23745==    by 0x40B585: main (immnd_main.c:348)

Analysis:
The problem is 'mLastResult' is not freed when discarding the client node.

Related

Tickets: #1848
Wiki: ChangeLog-4.7.2
Wiki: ChangeLog-5.0.1

Discussion

  • Hung Nguyen

    Hung Nguyen - 2016-05-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,3 +20,8 @@
     ==23745==    by 0x4187C2: immnd_process_evt (immnd_evt.c:609)
     ==23745==    by 0x40B585: main (immnd_main.c:348)
     ~~~
    +
    +---
    +
    +Analysis:
    +The problem is 'mLastResult' is not freed when discarding the client node.
    
     
  • Hung Nguyen

    Hung Nguyen - 2016-05-26
    • status: accepted --> review
     
  • Hung Nguyen

    Hung Nguyen - 2016-06-01
    • status: review --> fixed
     

Log in to post a comment.