laforge submitted this change.
Avoid segfault during 'show octoi-clients' VTY command
There might be a client without an octoi_sock, so we cannot
unconditionally try to use it for printing information.
Closes: OS#6662
Change-Id: I4a35087db6dc970f9ce9605853daab653279c5b0
---
M src/octoi/octoi_clnt_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/octoi/octoi_clnt_vty.c b/src/octoi/octoi_clnt_vty.c
index afca60c..3ea3a9a 100644
--- a/src/octoi/octoi_clnt_vty.c
+++ b/src/octoi/octoi_clnt_vty.c
@@ -243,7 +243,8 @@
struct octoi_sock *sock = clnt->sock;
octoi_vty_show_one_account(vty, "", clnt->cfg.account);
- vty_show_octoi_sock(vty, sock);
+ if (sock)
+ vty_show_octoi_sock(vty, sock);
}
return CMD_SUCCESS;
To view, visit change 39226. To unsubscribe, or for help writing mail filters, visit settings.