diff --git a/bar.c b/bar.c index 1fb361a..b2b271f 100644 --- a/bar.c +++ b/bar.c @@ -421,7 +421,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; @@ -505,6 +504,7 @@ get_randr_outputs(void) j++; } } + free(rres_reply); } void