From 48e2fb333f8018b357eb65c5e6c6e68ab584fc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Spycha=C5=82a?= <6419313+maciekspy@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:19:17 +0200 Subject: [PATCH] windows: Fix memory leak in `enumerate_hub_ports` function Variable `PCHAR ext_hub_name` is not freed after use. --- windows.c | 1 + 1 file changed, 1 insertion(+) diff --git a/windows.c b/windows.c index 2825a92..331ef91 100644 --- a/windows.c +++ b/windows.c @@ -210,6 +210,7 @@ static void enumerate_hub_ports(struct sp_port *port, HANDLE hub_device, snprintf(path, sizeof(path), "%s%ld.", parent_path, connection_info_ex->ConnectionIndex); enumerate_hub(port, ext_hub_name, path, dev_inst); + free(ext_hub_name); } free(connection_info_ex); } else {