---
name: "mysql_free_result"
section: "3"
platform: "linux"
package: "mariadb"
version: "13.0.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mysql_free_result"
---

# mysql\_free\_result(3)

### Name

mysql\_free\_result - Frees result set

### Synopsis

-

  ```
  #include <mysql.h>
  void mysql_free_result(MYSQL_RES * result);
  ```

### Description

Frees the memory associated with a result set. Returns void.

### Parameters

- •

  `result` - a result set identifier returned by **[mysql\_store\_result(3)](/mysql_store_result/3.md)** or **[mysql\_use\_result(3)](/mysql_use_result/3.md)**.

### Notes

- •

  You should always free your result set with mysql\_free\_result() as soon it’s not needed anymore

- •

  Row values obtained by a prior **[mysql\_fetch\_row(3)](/mysql_fetch_row/3.md)** call will become invalid after calling mysql\_free\_result().

### See also

- •

  **[mysql\_store\_result(3)](/mysql_store_result/3.md)**

- •

  **[mysql\_use\_result(3)](/mysql_use_result/3.md)**
