• M
    esx: Fix dynamic dispatch for CastFromAnyType functions · 4a9019af
    Matthias Bolte 提交于
    This was broken by the refactoring in ac1e6586. It resulted in a
    segfault for 'virsh vol-dumpxml' and related volume functions.
    
    Before the refactoring all users of the ESX_VI__TEMPLATE__DISPATCH
    macro dispatched on the item type, as the item is the input to all those
    functions.
    
    Commit ac1e6586 made the dynamically dispatched CastFromAnyType
    functions use this macro too, but this functions dispatched on the
    actual type of the AnyType object. The item is the output of the
    CastFromAnyType functions.
    
    This difference was missed in the refactoring, making CastFromAnyType
    functions dereferencing the item pointer that is NULL at the time of
    the dispatch.
    4a9019af
esx_vi_types.c 62.1 KB