From 5584a14a319044f75c9d8ea74abb6dede21ea721 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 23 Sep 2017 18:12:18 +0330 Subject: vty/vty.c: do not bind vty context to application's one The 'vty_app_info' struct could be used by some applications to provide its talloc context. In the future, it will facilitate the implementation of talloc context introspection via VTY. But the 'vty' talloc context, that contains lots of items (memory chunks), is being bound to an application's one, so it becomes hard to read the last. Let's do not bind the 'vty' context automatically, until some common talloc context export policy is implemented. Change-Id: I9cb6ce9f24dbae400029e2d9f9c933fbfb16248f --- src/vty/vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vty') diff --git a/src/vty/vty.c b/src/vty/vty.c index bd0d2c37..3d9c0d64 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1773,7 +1773,7 @@ extern void *tall_bsc_ctx; /* Install vty's own commands like `who' command. */ void vty_init(struct vty_app_info *app_info) { - tall_vty_ctx = talloc_named_const(app_info->tall_ctx, 0, "vty"); + tall_vty_ctx = talloc_named_const(NULL, 0, "vty"); tall_vty_vec_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_vector"); tall_vty_cmd_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_command"); -- cgit v1.2.3