diff options
-rw-r--r-- | src/loader/loader.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index a2fe0a241a2..c896fdc3360 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -118,7 +118,10 @@ bool is_kernel_i915(int fd) { char *kernel_driver = loader_get_kernel_driver_name(fd); - return kernel_driver && strcmp(kernel_driver, "i915") == 0; + bool is_i915 = kernel_driver && strcmp(kernel_driver, "i915") == 0; + + free(kernel_driver); + return is_i915; } #if defined(HAVE_LIBDRM) |