neels has uploaded this change for review.

View Change

coverity CID#313611

Change-Id: Ic5c87e029fe761b24ef9dcf801376da7b5a8d290
---
M src/libosmo-pfcp/pfcp_msg.c
1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/93/37993/1
diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c
index 66f6e59..dbe992f 100644
--- a/src/libosmo-pfcp/pfcp_msg.c
+++ b/src/libosmo-pfcp/pfcp_msg.c
@@ -589,6 +589,11 @@
struct osmo_fsm_inst *fi = m ? (m->ctx.session_fi ?: m->ctx.peer_fi) : NULL;
enum osmo_pfcp_cause *cause = m ? osmo_pfcp_msg_cause(m) : NULL;

+ if (!m) {
+ OSMO_STRBUF_PRINTF(sb, "NULL");
+ return sb.chars_needed;
+ }
+
if (fi)
OSMO_STRBUF_PRINTF(sb, "%s{%s}: ",
osmo_fsm_inst_name(fi),

To view, visit change 37993. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Ic5c87e029fe761b24ef9dcf801376da7b5a8d290
Gerrit-Change-Number: 37993
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>