Skip to content

Memory leak in pac_utils.h  #96

@yoav-lapin

Description

@yoav-lapin

In file pac_utils.h line 339 str_replace.

char *tmporig = malloc(strlen(orig) + 1); // Copy of orig that we work with

The variable tmporig is allocated but never freed or returned, this cause a memory leak in pacparser_find_proxy (and probably some other APIs).

Adding free(tmporig) in the end of the function will solve this leak.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions