aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index a7bcc407..f6eaec75 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -288,10 +288,14 @@ int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause)
{
struct abis_om_hdr *old_oh = msgb_l2(old_msg);
struct abis_om_fom_hdr *old_foh = msgb_l3(old_msg);
- struct msgb *msg = oml_msgb_alloc();
+ struct msgb *msg;
struct abis_om_fom_hdr *foh;
int is_manuf = 0;
+ msg = oml_msgb_alloc();
+ if (!msg)
+ return -ENOMEM;
+
/* make sure to respond with MANUF if request was MANUF */
if (old_oh->mdisc == ABIS_OM_MDISC_MANUF)
is_manuf = 1;