Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

memory is leak? #51

@huqiuyun

Description

@huqiuyun

QList QWin32PrintEnginePrivate::queryResolutions() const
{
// Read the supported resolutions of the printer.
QList list;

DWORD numRes = DeviceCapabilities(reinterpret_cast<const wchar_t *>(name.utf16()),
                                  reinterpret_cast<const wchar_t *>(port.utf16()),
                                  DC_ENUMRESOLUTIONS, 0, 0);
if (numRes == (DWORD)-1)
    return list;

LONG *enumRes = (LONG*)malloc(numRes * 2 * sizeof(LONG));

//-----------------\
the enumRes not free ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions