Commit 3f9478d6 authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

service: check errors of xmalloc

Original-patch-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent bc5828c1
......@@ -215,7 +215,9 @@ int cr_service(bool daemon_mode)
socklen_t server_addr_len;
socklen_t client_addr_len;
cr_service_client = malloc(sizeof(struct _cr_service_client));
cr_service_client = xmalloc(sizeof(struct _cr_service_client));
if (cr_service_client == NULL)
goto err;
server_fd = socket(AF_LOCAL, SOCK_SEQPACKET, 0);
if (server_fd == -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment