Some memleaks and last minute 3.6 release changes.

This commit is contained in:
Olof hagsand 2018-04-29 18:35:06 +02:00
parent aa2ada1f5c
commit 1ac57dedaf
11 changed files with 133 additions and 69 deletions

View file

@ -1042,8 +1042,8 @@ extension_substmt : argument_stmt { clicon_debug(2,"extension-substmt -> argu
| { clicon_debug(2,"extension-substmt -> "); }
;
argument_stmt : K_ARGUMENT id_arg_str ';'
| K_ARGUMENT id_arg_str '{' '}'
argument_stmt : K_ARGUMENT id_arg_str ';' { free($2); }
| K_ARGUMENT id_arg_str '{' '}' { free($2); }
;
/* Feature */
@ -1403,7 +1403,7 @@ qstring : DQ ustring DQ { $$=$2; clicon_debug(2,"string-> \" ustring \""
ustring : ustring CHAR
{
int len = strlen($1);
$$ = realloc($1, len+strlen($2) + 1);
$$ = realloc($1, len+strlen($2) + 1);
sprintf($$+len, "%s", $2);
free($2);
}