aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/vty_interface_layer3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 102b4965..157260a5 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -414,8 +414,10 @@ DEFUN(ena_subscr_name,
}
name = argv_concat(argv, argc, 2);
- if (!name)
+ if (!name) {
+ subscr_put(subscr);
return CMD_WARNING;
+ }
strncpy(subscr->name, name, sizeof(subscr->name));
talloc_free(name);