---
name: "odbx_finish"
section: "3"
platform: "linux"
package: "opendbx"
version: "1.4.6-13"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/odbx_finish"
---

# odbx\_finish(3)

Frees connection resources

## NAME

odbx\_finish - Frees connection resources

## SYNOPSIS

```
FC#include <opendbx/api.h>F[0]
```

FCint **odbx\_finish**F\[0\]  FC(odbx\_t\* *handle*);F\[0\]

## DESCRIPTION

FC**odbx\_finish**F\[0\]() is responsible for freeing all resources allocated by FC**odbx\_init**F\[0\]() and finally may shut down the connection to the database server. It must not be invoked before calling FC**odbx\_unbind**F\[0\]() to avoid memory leaks and open connection descriptors on the client and server side which may block necessary resources later on.

The FChandleF\[0\] parameter has to be the connection object created and returned by FC**odbx\_init**F\[0\](). It becomes invalid after it was supplied to FC**odbx\_finish**F\[0\]() for the first time and the function will return an error for all further invocations.

## RETURN VALUE

FC**odbx\_finish**F\[0\]() returns FCODBX\_ERR\_SUCCESSF\[0\], or an error code whose value is less than zero if FChandleF\[0\] is invalid or one of the operations couldn't be completed successfully by the backend module. Possible error codes are listed in the error section and they can be feed to FC**odbx\_error**F\[0\]() and FC**odbx\_error\_type**F\[0\]() to get further details.

## ERRORS

- \-FCODBX\_ERR\_PARAMF\[0\]

  FChandleF\[0\] is NULL or the supplied connection object is invalid

## SEE ALSO

FC**odbx\_error**F\[0\](), FC**odbx\_error\_type**F\[0\](), FC**odbx\_init**F\[0\](), FC**odbx\_unbind**F\[0\]()
