diff --git a/src/drm-shim/drm_shim.c b/src/drm-shim/drm_shim.c index 6d090d12292..4547aa1ca27 100644 --- a/src/drm-shim/drm_shim.c +++ b/src/drm-shim/drm_shim.c @@ -189,6 +189,8 @@ drm_shim_override_file(const char *contents, const char *path_format, ...) override->contents = strdup(contents); } +static uint32_t inited = 0; + static void destroy_shim(void) { @@ -196,6 +198,10 @@ destroy_shim(void) free(render_node_path); free(render_node_dirent_name); free(subsystem_path); + + render_node_minor = -1; + file_overrides_count = 0; + p_atomic_set(&inited, 0); } /* Initialization, which will be called from the first general library call @@ -204,8 +210,6 @@ destroy_shim(void) static void init_shim(void) { - static uint32_t inited = 0; - drm_shim_debug = debug_get_bool_option("DRM_SHIM_DEBUG", false); /* We can't lock this, because we recurse during initialization. */