Free variable before returning

This commit is contained in:
DL6ER 2017-02-06 11:23:00 +01:00
parent 8b10d6dcb8
commit dc3f44707b
No known key found for this signature in database
GPG Key ID: BB8EC0BC77973A30
1 changed files with 3 additions and 0 deletions

View File

@ -138,7 +138,10 @@ bool insetupVarsArray(char * str)
char * domain = calloc(strlen(setupVarsArray[i]),sizeof(char));
strncpy(domain,setupVarsArray[i]+1,strlen(setupVarsArray[i])-1);
if(strstr(str, domain) != NULL)
{
free(domain);
return true;
}
}
else
{