Trivial: vpp/vnet/main.c fix resource leak
@@ -155,10 +155,17 @@ main (int argc, char *argv[])
}
argv_ = calloc (1, sizeof (char *));
if (argv_ == NULL)
+ {
+ fclose (fp);
return 1;
+ }
arg = strndup (argv[0], 1024);
if (arg == NULL)
+ {
+ fclose (fp);
+ free (argv_);
return 1;
+ }
argv_[0] = arg;
while (1)
