• Caolán McNamara's avatar
    Resolves: tdf#89643 report builder function wizard segfaults · 7c3abee2
    Caolán McNamara yazdı
    regression from
    
        commit 3d652128
        CommitDate: Thu Jul 31 22:14:25 2014 +0200
    
            fix memory leak around function descriptions
    
            Found by Lsan.
    
    There are two implementations of getCategory, one (sc) returns a new one each
    time (hence the leak fix) and the other (reportdesign) returns a pointer to one
    that belongs to the manger (hence the crash).
    
    The code in formula really looks to me to expect that the getCategory return a
    pointer that "someone else" needs to look after, i.e. the reportdesign variant
    is the more correct so revert 3d652128 and to
    fix the leak make the sc own the ScFunctionCategories and just cache them like
    the reportdesign one does
    
    Change-Id: Ifd986301a54b4d20449e864697655cd973e0c4df
    7c3abee2
funcdesc.hxx 13.3 KB