s3:lib: use talloc_get_type_abort
[samba.git] / source3 / lib / util_sock.c
index 682d964b30c8eee95fa7c9d467ed3ad0076625b7..c4de85dd130beb94c04d9642d79f8b74f6cfdd75 100644 (file)
@@ -1363,7 +1363,7 @@ struct tevent_req *getaddrinfo_send(TALLOC_CTX *mem_ctx,
 static void getaddrinfo_do(void *private_data)
 {
        struct getaddrinfo_state *state =
-               (struct getaddrinfo_state *)private_data;
+               talloc_get_type_abort(private_data, struct getaddrinfo_state);
 
        state->ret = getaddrinfo(state->node, state->service, state->hints,
                                 &state->res);