Skip to content

Memory cleanups - #9

Open
treveradams wants to merge 1 commit into
c-icap:masterfrom
treveradams:memory-cleanups
Open

Memory cleanups#9
treveradams wants to merge 1 commit into
c-icap:masterfrom
treveradams:memory-cleanups

Conversation

@treveradams

Copy link
Copy Markdown
Contributor

Yes, these are only on shutdown. However, I do think it is best to be clean.

Comment thread service.c
ci_list_destroy(service_extra_data_list[i].option_handlers);
service_extra_data_list[i].option_handlers = NULL;
}
free(service_data(service_list[i]));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is does not looks correct. The service_data function will return a pointer to an item of the service_extra_data_list array. This item is not an allocated memory block.

In the other hand the service_extra_data_list array needs to be released.

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.

2 participants