Fix mem leak in unit test.

Patch from jitendra.sharma at intel.com.
This commit is contained in:
Darren Tucker 2019-08-05 21:36:48 +10:00
parent c4ffb72593
commit d46075b923
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,7 @@ int
main(void)
{
char b[5];
char *src;
char *src = NULL;
snprintf(b,5,"123456789");
if (b[4] != '\0')
@ -69,5 +69,6 @@ main(void)
if (x_snprintf(b, 1, "%s %d", "hello", 12345) != 11)
fail("vsnprintf does not return required length");
free(src);
return failed;
}