diff options
Diffstat (limited to 'usr/mgmt_ipc.c')
-rw-r--r-- | usr/mgmt_ipc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c index c292161..054378e 100644 --- a/usr/mgmt_ipc.c +++ b/usr/mgmt_ipc.c @@ -453,8 +453,11 @@ mgmt_ipc_read_req(queue_task_t *qtask) /* Remember the allocated pointer in the * qtask - it will be freed by write_rsp. * Note: we allocate one byte in excess - * so we can append a NUL byte. */ + * so we can append a NULL byte. */ qtask->payload = malloc(req->payload_len + 1); + if (!qtask->payload) + return -ENOMEM; + rc = mgmt_ipc_read_data(qtask->mgmt_ipc_fd, qtask->payload, req->payload_len); |