Don't free the screen resources reply until we absolutely have to.

On my system, premature free'ing resulted in an error at the
xcb_randr_get_output_info_reply call, so randr didn't work at all.
This commit is contained in:
Nathan Hoad 2014-02-15 21:02:59 +11:00
parent 6fb75424e8
commit ad8d903131

2
bar.c
View File

@ -414,7 +414,6 @@ get_randr_outputs(void)
num = xcb_randr_get_screen_resources_current_outputs_length(rres_reply);
outputs = xcb_randr_get_screen_resources_current_outputs(rres_reply);
config_timestamp = rres_reply->config_timestamp;
free(rres_reply);
if (num < 1) {
fprintf(stderr, "Failed to get current randr outputs\n");
return;
@ -497,6 +496,7 @@ get_randr_outputs(void)
j++;
}
}
free(rres_reply);
}
void