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

Commit

Permalink
string-icu: Memory issues
Browse files Browse the repository at this point in the history
Possible double free on string_change_case();
Memory leak on string_concat() and string_change_case().

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
  • Loading branch information
edersondisouza committed Aug 13, 2015
1 parent c12a596 commit 44cabd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/flow/string/string-icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ string_concat(struct sol_flow_node *node,
fail_sz:
free(dest);
fail_to_utf8:
free(final);
sol_flow_send_error_packet(node, -errno, u_errorName(err));
return -errno;
}
Expand Down Expand Up @@ -770,11 +771,12 @@ string_change_case(struct sol_flow_node *node,

return r;

fail_to_utf8:
fail_case_func:
free(u_lower);
fail_to_utf8:
fail_from_utf8:
free(u_orig);
free(final);
sol_flow_send_error_packet(node, -errno, u_errorName(err));
return -errno;
}
Expand Down

0 comments on commit 44cabd3

Please sign in to comment.