1c06f8c Issue 49437 - Fix memory leak with indirect COS

Authored and Committed by mreynolds 5 months ago
    Issue 49437 - Fix memory leak with indirect COS
    Bug Description:  There are two leaks when dealing with indirect COS. The
                      first leak is caused by the COS cache entry's objectclass
                      list not being freed when the entry is removed from the
                      hash table.
                      The other leak is caused when we follow an indirect pointer
                      COS and do not free a tmp value set that goes unused.
    Fix description:  Free the COS entry objectclass list when removing an entry
                      from the hash table.  When querying a COS attribute and the
                      returned attribute (out_attr) is NULL, then free the unused
                      tmp_val ValueSet as it's not consumed by anything.
    Fixes: https://pagure.io/389-ds-base/issue/49437
    Reviewed by: firstyear & tbordaz(Thanks!)
file modified
+21 -18