Skip to content

Commit

Permalink
core: parser - free unlinked local param structure in parse_to_param()
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Sep 8, 2021
1 parent bd92fb5 commit f624e17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/parser/parse_addr_spec.c
Expand Up @@ -281,6 +281,10 @@ static char *parse_to_param(char *const buffer, const char *const end,
semicolon_add_param:
add_param(param, to_b, newparam);
case E_PARA_VALUE:
if(newparam) {
pkg_free(newparam);
newparam = NULL;
}
param = (struct to_param *)pkg_malloc(
sizeof(struct to_param));
if(!param) {
Expand Down

0 comments on commit f624e17

Please sign in to comment.