examples: fix improper use of free

Closes #2303
This commit is contained in:
j-n-f 2020-07-05 18:23:38 -04:00 committed by Simon Ser
parent b2bd536308
commit b61a98c417

View file

@ -127,7 +127,7 @@ int main(int argc, char *argv[]) {
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display); wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
free(registry); wl_registry_destroy(registry);
if (idle_manager == NULL) { if (idle_manager == NULL) {
fprintf(stderr, "display doesn't support idle protocol\n"); fprintf(stderr, "display doesn't support idle protocol\n");