...e _cleanup_(f) __attribute__((cleanup(f))) static int log_error(int r, const char *str) { fprintf(stderr, "%s failed: %s\n", str, strerror(-r)); return r; } typedef struct objec…