---
name: "rdma_destroy_id"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/rdma_destroy_id"
---

# rdma\_destroy\_id(3)

Release a communication identifier.

## NAME

rdma\_destroy\_id - Release a communication identifier.

## SYNOPSIS

**#include \<rdma/rdma\_cma.h\>**

**int rdma\_destroy\_id** **(struct rdma\_cm\_id \****id***);**

## ARGUMENTS

- id

  The communication identifier to destroy.

## DESCRIPTION

Destroys the specified rdma\_cm\_id and cancels any outstanding asynchronous operation.

## RETURN VALUE

Returns 0 on success, or -1 on error.  If an error occurs, errno will be set to indicate the failure reason.

## NOTES

Users must free any associated QP with the rdma\_cm\_id before calling this routine and ack all related events.

## SEE ALSO

[rdma\_create\_id(3)](/rdma_create_id/3.md), [rdma\_destroy\_qp(3)](/rdma_destroy_qp/3.md), [rdma\_ack\_cm\_event(3)](/rdma_ack_cm_event/3.md)
