[common] fix option parser memory leak

This commit is contained in:
Geoffrey McRae
2019-05-09 23:05:33 +10:00
parent 5677117c0d
commit 53ade56b4e
2 changed files with 3 additions and 1 deletions

View File

@@ -196,6 +196,8 @@ bool option_parse(int argc, char * argv[])
break;
}
free(arg);
if (o->validator)
if (!o->validator(&o->value))
{