X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fclear.cpp;h=38268edd2e4362fb7dbdf1361c030a7de89e170a;hb=f149493493fbd8a3efa4748832c03278c96c38ca;hp=fcac76ffa4c349a7e97ce521b2d9cc8c06539413;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/clear.cpp b/src/bin/lttng-sessiond/clear.cpp index fcac76ffa..38268edd2 100644 --- a/src/bin/lttng-sessiond/clear.cpp +++ b/src/bin/lttng-sessiond/clear.cpp @@ -20,9 +20,11 @@ #include "kernel.hpp" #include "cmd.hpp" +namespace { struct cmd_clear_session_reply_context { int reply_sock_fd; }; +} /* namespace */ static void cmd_clear_session_reply(const struct ltt_session *session, @@ -67,7 +69,7 @@ int cmd_clear_session(struct ltt_session *session, int *sock_fd) usess = session->ust_session; if (sock_fd) { - reply_context = (cmd_clear_session_reply_context *) zmalloc(sizeof(*reply_context)); + reply_context = zmalloc(); if (!reply_context) { ret = LTTNG_ERR_NOMEM; goto end;