laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/39226?usp=email )

Change subject: Avoid segfault during 'show octoi-clients' VTY command
......................................................................

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(-)

Approvals:
  tnt: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




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 https://gerrit.osmocom.org/c/osmo-e1d/+/39226?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4a35087db6dc970f9ce9605853daab653279c5b0
Gerrit-Change-Number: 39226
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: tnt <[email protected]>

Reply via email to