fix some possible errors

This commit is contained in:
Jacek Jendrzej
2014-11-06 14:40:44 +01:00
parent c8f0c68cf6
commit d5d6c4de62
4 changed files with 7 additions and 5 deletions

View File

@@ -124,6 +124,7 @@ int my_system(int argc, const char *arg, ...)
if (i == argv_max)
{
fprintf(stderr, "my_system: too many arguments!\n");
va_end(args);
return -1;
}
argv[i] = va_arg(args, const char *);