• Jakob Bornecrantz's avatar
    vulkan-device-select: Don't leak drmDevicePtr · 3f339f38
    Jakob Bornecrantz authored
    
    
    ASAN found a leak:
    
    ```
    Direct leak of 1440 byte(s) in 10 object(s) allocated from:
        #0 0x4a9a92 in calloc (build-Monado-CMake/src/xrt/targets/service/monado-service+0x4a9a92)
        #1 0x7fdf82afed06 in drmDeviceAlloc build-drm/../drm/xf86drm.c:3933:14
        #2 0x7fdf82b00203 in drmProcessPciDevice build-drm/../drm/xf86drm.c:3965:11
        #3 0x7fdf82b00203 in process_device build-drm/../drm/xf86drm.c:4359:16
        #4 0x7fdf82b0485e in drmGetDevice2 build-drm/../drm/xf86drm.c:4528:15
        #5 0x7fdf70751113 in device_select_find_xcb_pci_default ../src/vulkan/device-select-layer/device_select_x11.c:95:13
        #6 0x7fdf70751113 in get_default_device ../src/vulkan/device-select-layer/device_select_layer.c:395:21
        #7 0x7fdf70751113 in device_select_EnumeratePhysicalDevices ../src/vulkan/device-select-layer/device_select_layer.c:456:33
    ```
    
    Cc: mesa-stable
    Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    3f339f38