X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry.cpp;h=b327fdf32c449dfc082af8a55eebd9dd8b99c145;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=0b92d19c52b3aa459cd22110d7230c753394e1d5;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-registry.cpp b/src/bin/lttng-sessiond/ust-registry.cpp index 0b92d19c5..b327fdf32 100644 --- a/src/bin/lttng-sessiond/ust-registry.cpp +++ b/src/bin/lttng-sessiond/ust-registry.cpp @@ -288,7 +288,7 @@ static struct ust_registry_event *alloc_event(int session_objd, return NULL; } - event = (ust_registry_event *) zmalloc(sizeof(*event)); + event = zmalloc(); if (!event) { PERROR("zmalloc ust registry event"); goto error; @@ -630,7 +630,7 @@ int ust_registry_create_or_find_enum(struct ust_registry_session *session, } /* Check if the enumeration was already dumped */ - reg_enum = (ust_registry_enum *) zmalloc(sizeof(*reg_enum)); + reg_enum = zmalloc(); if (!reg_enum) { PERROR("zmalloc ust registry enumeration"); ret = -ENOMEM; @@ -756,7 +756,7 @@ int ust_registry_channel_add(struct ust_registry_session *session, LTTNG_ASSERT(session); - chan = (ust_registry_channel *) zmalloc(sizeof(*chan)); + chan = zmalloc(); if (!chan) { PERROR("zmalloc ust registry channel"); ret = -ENOMEM; @@ -887,7 +887,7 @@ int ust_registry_session_init(struct ust_registry_session **sessionp, LTTNG_ASSERT(sessionp); - session = (ust_registry_session *) zmalloc(sizeof(*session)); + session = zmalloc(); if (!session) { PERROR("zmalloc ust registry session"); goto error_alloc;