Prevent Crash in show pdp-context from vty

Fix test for return value from gtp_pdp_getimsi() so
we do not call show_one_pdp() with an uninitialised pdp_t

Change-Id: Ic40429939b185f97c020dd3904e054fe860b91e8
This commit is contained in:
Keith Whyte 2020-10-10 15:15:31 +02:00
parent cbc07bdd82
commit 080dcfaabe
1 changed files with 1 additions and 1 deletions

View File

@ -903,7 +903,7 @@ DEFUN(show_pdpctx_imsi, show_pdpctx_imsi_cmd,
if (argc > 2) {
nsapi = atoi(argv[2]);
if (gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) {
if (!gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) {
show_one_pdp(vty, pdp);
num_found++;
}