Skip to content

Commit

Permalink
fix memory handling in t_rewrite_config
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed May 11, 2021
1 parent 737be43 commit 9f66c15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/t_rewrite_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ main (int argc, char *argv[])
numtests = 1;

{
addattrs = malloc(2);
addattrs = malloc(2 * sizeof(char *));
addattrs[0] = stringcopy("1:'1%00%001%41%2541", 0);
addattrs[1] = NULL;

Expand Down Expand Up @@ -55,7 +55,7 @@ main (int argc, char *argv[])
/* test issue #62 */
{
char *expectreplace = "\\1=86400";
char **modvattrs = malloc(2);
char **modvattrs = malloc(2 * sizeof(char *));
rewritename= "issue62";

modvattrs[0] = stringcopy("9:102:/^(h323-credit-time).*$/\\1=86400/",0);
Expand All @@ -79,8 +79,6 @@ main (int argc, char *argv[])
} else {
printf("not ok %d - rewrite config issue #62\n", numtests++);
}

free(modvattrs);
}

return 0;
Expand Down

0 comments on commit 9f66c15

Please sign in to comment.