aboutsummaryrefslogtreecommitdiffstats
path: root/free_error.c
blob: a15d36ca3502277ecf5efa4435541c960c6fa540 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* See LICENSE file for copyright and license details. */
#include "internal.h"


void
liberror_free_error(struct liberror_error *error)
{
	if (!error)
		return;
	if (error->backtrace && !--error->backtrace->refcount)
		free(error->backtrace);
	liberror_free_error(error->cause);
	if (error->dynamically_allocated)
		free(error);
}