gtphub: fix possible NULL deref: don't print NULL tunnel
Fixes: coverity CID#158302 Change-Id: Ic500a3eb0c49393c7962a20e61eb57fd467208d3
This commit is contained in:
parent
ecdfd6d097
commit
ea619f1704
|
@ -1039,6 +1039,9 @@ const char *gtphub_tunnel_str(struct gtphub_tunnel *tun)
|
|||
int left = sizeof(buf);
|
||||
int l;
|
||||
|
||||
if (!tun)
|
||||
return "null-tunnel";
|
||||
|
||||
APPEND("TEI=%x: ", tun->tei_repl);
|
||||
APPEND("%s", gtphub_tunnel_side_str(tun, GTPH_SIDE_SGSN));
|
||||
APPEND(" <-> %s", gtphub_tunnel_side_str(tun, GTPH_SIDE_GGSN));
|
||||
|
|
Loading…
Reference in New Issue