Skip to content
  • Pan Nengyuan's avatar
    246da7db
    qom-hmp-cmds: fix a memleak in hmp_qom_get · 246da7db
    Pan Nengyuan authored
    
    
    'obj' forgot to free at the end of hmp_qom_get(). Fix that.
    
    The leak stack:
    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f4e3a779ae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8)
        #1 0x7f4e398f91d5 in g_malloc (/lib64/libglib-2.0.so.0+0x531d5)
        #2 0x55c9fd9a3999 in qstring_from_substr /build/qemu/src/qobject/qstring.c:45
        #3 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:175
        #4 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:168
        #5 0x55c9fd88b34d in visit_type_str /build/qemu/src/qapi/qapi-visit-core.c:308
        #6 0x55c9fd59aa6b in property_get_str /build/qemu/src/qom/object.c:2064
        #7 0x55c9fd5adb8a in object_property_get_qobject /build/qemu/src/qom/qom-qobject.c:38
        #8 0x55c9fd4a029d in hmp_qom_get /build/qemu/src/qom/qom-hmp-cmds.c:66
    
    Fixes: 89cf4fe3
    Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
    Signed-off-by: default avatarPan Nengyuan <pannengyuan@huawei.com>
    Message-Id: <20200603070338.7922-1-pannengyuan@huawei.com>
    Reviewed-by: default avatarLi Qiang <liq3ea@gmail.com>
    Tested-by: default avatarLi Qiang <liq3ea@gmail.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    246da7db
    qom-hmp-cmds: fix a memleak in hmp_qom_get
    Pan Nengyuan authored
    
    
    'obj' forgot to free at the end of hmp_qom_get(). Fix that.
    
    The leak stack:
    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f4e3a779ae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8)
        #1 0x7f4e398f91d5 in g_malloc (/lib64/libglib-2.0.so.0+0x531d5)
        #2 0x55c9fd9a3999 in qstring_from_substr /build/qemu/src/qobject/qstring.c:45
        #3 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:175
        #4 0x55c9fd894bd3 in qobject_output_type_str /build/qemu/src/qapi/qobject-output-visitor.c:168
        #5 0x55c9fd88b34d in visit_type_str /build/qemu/src/qapi/qapi-visit-core.c:308
        #6 0x55c9fd59aa6b in property_get_str /build/qemu/src/qom/object.c:2064
        #7 0x55c9fd5adb8a in object_property_get_qobject /build/qemu/src/qom/qom-qobject.c:38
        #8 0x55c9fd4a029d in hmp_qom_get /build/qemu/src/qom/qom-hmp-cmds.c:66
    
    Fixes: 89cf4fe3
    Reported-by: default avatarEuler Robot <euler.robot@huawei.com>
    Signed-off-by: default avatarPan Nengyuan <pannengyuan@huawei.com>
    Message-Id: <20200603070338.7922-1-pannengyuan@huawei.com>
    Reviewed-by: default avatarLi Qiang <liq3ea@gmail.com>
    Tested-by: default avatarLi Qiang <liq3ea@gmail.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading