[common] fix stringlist const free bug

This commit is contained in:
Geoffrey McRae 2019-05-21 11:30:05 +10:00
parent cc6dd58778
commit d9b6d115d1
2 changed files with 5 additions and 4 deletions

View File

@ -1 +1 @@
a12-189-g0ba931cbed+1
a12-190-gcc6dd58778+1

View File

@ -33,9 +33,10 @@ StringList stringlist_new(bool owns_strings)
{
StringList sl = malloc(sizeof(struct StringList));
sl->size = 32;
sl->count = 0;
sl->list = malloc(sizeof(char *) * sl->size);
sl->owns_strings = owns_strings;
sl->size = 32;
sl->count = 0;
sl->list = malloc(sizeof(char *) * sl->size);
return sl;
}