SDL: Call SDL_UDEV_Quit() if we don't end up using it

https://github.com/libsdl-org/SDL/commit/e5a4f093632739160365d699b54e94c6772c6657

From e5a4f093632739160365d699b54e94c6772c6657 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 13 Jan 2025 10:22:10 -0800
Subject: [PATCH] Call SDL_UDEV_Quit() if we don't end up using it

---
 src/joystick/linux/SDL_sysjoystick.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index fe8fca9c9d670..8fbaca99d024b 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -1036,6 +1036,10 @@ static bool LINUX_JoystickInit(void)
                          "udev init failed, disabling udev integration");
             enumeration_method = ENUMERATION_FALLBACK;
         }
+    } else {
+        if (udev_initialized) {
+            SDL_UDEV_Quit();
+        }
     }
 #endif