Skip to content

DirectShow get device name not free #26044

@gongjianbo

Description

@gongjianbo

System Information

OpenCV version: 4.x && 5.x
Operating System / Platform: Win32

Detailed description

After getting the device name, VariantClear was not used to clearn varName.

// opencv/modules/videoio/src/cap_dshow.cpp

int videoInput::listDevices(bool silent) {
    // ...
    VARIANT varName;
    VariantInit(&varName); // not using VariantClear
    // ...
}

Steps to reproduce

None

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions