aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-26 19:43:54 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-26 19:43:54 +0800
commit742fc700117d7c81c55b3df7a2486654067a8771 (patch)
tree08a6587871b08909ea18b95e2063a2cfe1ba4e58 /openbsc
parentac30cc833c60e5fac03faf5b72c8908b5c3275f9 (diff)
vty_interface_layer3: Fix a subscriber memory leak..
Diffstat (limited to 'openbsc')
-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);