---
title: flexda_custom_deinit_ctx
description: "用户反初始化自定义上下文。"
url: https://www.hikunpeng.com/document/detail/zh/flexda/api/dpak_api024.html
sourcePath: /source/zh/flexda/api/dpak_api024.html
indexId: aa2affebb7f86f834353c6041f9f9a94f87b36a807b9fef6cf1a23674ab7915438
---
# flexda_custom_deinit_ctx

#### 接口功能

用户反初始化自定义上下文。


#### 接口格式

int flexda_custom_deinit_ctx(void **ctx)


#### 参数说明

| 参数名 | 参数类型 | 入参/出参 | 说明 |
| --- | --- | --- | --- |
| ctx | void \*\* | 入参 | 自定义上下文指针地址。 |
| 函数返回值 | int | 出参 | 若函数执行成功则返回0，若函数执行失败则返回错误码。 |


#### 使用实例

```
int flexda_custom_deinit_ctx(void **ctx_addr)
{
struct custom_packet_ctx *ctx = (struct custom_packet_ctx *)*ctx_addr;
flexda_free(ctx);
*ctx_addr = NULL;
return 0;
}
```
