Skip to content

Conversation

@jitendra42
Copy link
Contributor

Fix for potential memory leak.
FunctionDefLibrary object memory is not freed in case of errors occurs. This PR fixes this issue.

@jitendra42 jitendra42 added the wip Work in progress label Jan 8, 2020
@jitendra42 jitendra42 removed the wip Work in progress label Jan 9, 2020
Copy link
Contributor

@bani-intelaipg bani-intelaipg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

auto status = EncapsulateClusters(options.graph->get(), idx, fdeflib_new,
config_map, {0, {}});
if (status != Status::OK()) {
delete (fdeflib_new);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for braces delete fdeflib_new;

Copy link
Contributor

@shresthamalik shresthamalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left minor comment. LGTM

@sayantan-nervana sayantan-nervana merged commit 36107db into master Jan 13, 2020
@sayantan-nervana sayantan-nervana deleted the jitendra/mem-leak-fix branch January 13, 2020 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants