Diff between 48a2c3db1ccff28a615fac56066ca7d721f98d0a and 06eb3d80452feb284c0ef475cbd5976457686142
Changed Files
| File | Additions | Deletions | Status |
| src/shared/btp.c | +3 | -0 | modified |
Full Patch
diff --git a/src/shared/btp.c b/src/shared/btp.c
index 7762267..93df37a 100644
--- a/src/shared/btp.c
+++ b/src/shared/btp.c
@@ -294,6 +294,9 @@ bool btp_send(struct btp *btp, uint8_t service, uint8_t opcode, uint8_t index,
struct pending_message *msg;
size_t len;
+ if (!btp)
+ return false;
+
len = sizeof(*hdr) + length;
hdr = l_malloc(len);
if (!hdr)