summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vpp/vnet/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index db28662de4c..89dfedcd015 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -155,10 +155,17 @@ main (int argc, char *argv[])
}
argv_ = calloc (1, sizeof (char *));
if (argv_ == NULL)
- return 1;
+ {
+ fclose (fp);
+ return 1;
+ }
arg = strndup (argv[0], 1024);
if (arg == NULL)
- return 1;
+ {
+ fclose (fp);
+ free (argv_);
+ return 1;
+ }
argv_[0] = arg;
while (1)