diff --git a/libqrexec/exec.c b/libqrexec/exec.c index d641b3b8..1c21addc 100644 --- a/libqrexec/exec.c +++ b/libqrexec/exec.c @@ -382,12 +382,11 @@ struct qrexec_parsed_command *parse_qubes_rpc_command( struct qrexec_parsed_command *cmd; - if (!(cmd = malloc(sizeof(*cmd)))) { - PERROR("malloc"); + if (!(cmd = calloc(1, sizeof(*cmd)))) { + PERROR("calloc"); return NULL; } - memset(cmd, 0, sizeof(*cmd)); cmd->send_service_descriptor = true; cmd->cmdline = cmdline;