Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
form: Fix memory leak
Browse files Browse the repository at this point in the history
sol_buffer_init is being called inside a loop without the
sol_buffer_fini causing the previous allocated data being lost.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
  • Loading branch information
ceolin committed Jan 26, 2016
1 parent d662d58 commit 92e5541
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/flow/form/form.c
Original file line number Diff line number Diff line change
Expand Up @@ -3226,6 +3226,7 @@ string_formatted_open(struct sol_flow_node *node,
numeric_field_present = true;

ptr = tmp + 1;
sol_buffer_fini(&mdata->formatted_value);
}

if (!numeric_field_present) {
Expand Down

0 comments on commit 92e5541

Please sign in to comment.