Skip to content

Commit

Permalink
coverity: #1425810
Browse files Browse the repository at this point in the history
Explicit null dereferenced

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Jun 15, 2018
1 parent 0b3410e commit a674dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/commands.c
Expand Up @@ -213,7 +213,7 @@ static int lxc_cmd_rsp_send(int fd, struct lxc_cmd_rsp *rsp)
return -1;
}

if (rsp->datalen <= 0)
if (!rsp->data || rsp->datalen <= 0)
return 0;

ret = send(fd, rsp->data, rsp->datalen, 0);
Expand Down

0 comments on commit a674dfe

Please sign in to comment.