aboutsummaryrefslogtreecommitdiffstats
path: root/src/servers/crtc.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-08-05 14:56:14 +0200
committerMattias Andrée <maandree@kth.se>2016-08-05 14:56:14 +0200
commit192c713c9ab0e5597f2f690ebdf777203dcbcbbb (patch)
treece47d3dcefd6e07c2e85eba3706a2c63a5b948b5 /src/servers/crtc.c
parentFix bugs (diff)
downloadcoopgammad-192c713c9ab0e5597f2f690ebdf777203dcbcbbb.tar.gz
coopgammad-192c713c9ab0e5597f2f690ebdf777203dcbcbbb.tar.bz2
coopgammad-192c713c9ab0e5597f2f690ebdf777203dcbcbbb.tar.xz
Fix bugs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/servers/crtc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/servers/crtc.c b/src/servers/crtc.c
index bc3b51b..9e08820 100644
--- a/src/servers/crtc.c
+++ b/src/servers/crtc.c
@@ -129,6 +129,7 @@ int initialise_crtcs(void)
int gerror;
/* Get partitions */
+ outputs_n = 0;
if (site.partitions_available)
if (!(partitions = calloc(site.partitions_available, sizeof(*partitions))))
goto fail;
@@ -244,12 +245,15 @@ int disconnect(void)
{
outputs[i].crtc = NULL;
libgamma_crtc_destroy(crtcs + i);
+ output_destroy(outputs + i);
}
free(crtcs), crtcs = NULL;
+ free(outputs), outputs = NULL;
for (i = 0; i < site.partitions_available; i++)
libgamma_partition_destroy(partitions + i);
free(partitions), partitions = NULL;
libgamma_site_destroy(&site);
+ memset(&site, 0, sizeof(site));
return 0;
}