---
name: "zip_source_free"
section: "3"
platform: "linux"
package: "libzip"
version: "1.11.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/zip_source_free"
---

# zip\_source\_free(3)

free zip data source

## NAME

**zip\_source\_free** – free zip data source

## LIBRARY

libzip (-lzip)

## SYNOPSIS

**#include \<zip.h\>**

*void*\

**zip\_source\_free**(*zip\_source\_t \*source*);

## DESCRIPTION

The function **zip\_source\_free**() decrements the reference count of *source* and frees it if the reference count drops to 0. If *source* is NULL, it does nothing.

*NOTE*: This function should not be called on a *source* after it was used successfully in a [zip\_open\_from\_source(3)](/zip_open_from_source/3.md), [zip\_file\_add(3)](/zip_file_add/3.md), or [zip\_file\_replace(3)](/zip_file_replace/3.md) call.

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_source(5)](/zip_source/5.md), [zip\_source\_keep(3)](/zip_source_keep/3.md)

## HISTORY

**zip\_source\_free**() was added in libzip 0.6.

## AUTHORS

Dieter Baron ⟨*dillo@nih.at*⟩ and Thomas Klausner ⟨*wiz@gatalith.at*⟩
