aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_dummy_partition_destroy.c
blob: 4ecdc9f0e38e5903701c4ebd39ee88ac90149fdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* See LICENSE file for copyright and license details. */
#define IN_LIBGAMMA_DUMMY
#include "common.h"


/**
 * Release all resources held by a partition state
 * 
 * @param  this  The partition state
 */
void
libgamma_dummy_partition_destroy(struct libgamma_partition_state *restrict this)
{
	struct libgamma_dummy_partition *data = this->data;
	size_t i;

	if (data) {
		for (i = 0; i < data->crtc_count; i++) {
			free(data->crtcs[i].info.edid);
			free(data->crtcs[i].info.connector_name);
		}
		free(data->crtcs);
		data->crtcs = NULL;
	}
}