From e98b84ab84ca11948f5b3dc0dddea9e0d8fd21e4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 19 Mar 2020 16:29:27 -0600 Subject: [PATCH] wincompat: use string_list instead of inflatable_buffer Signed-off-by: Jason A. Donenfeld --- src/wincompat/ipc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/wincompat/ipc.c b/src/wincompat/ipc.c index 9dce816..ce8fdb6 100644 --- a/src/wincompat/ipc.c +++ b/src/wincompat/ipc.c @@ -113,7 +113,7 @@ err: return NULL; } -static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer) +static int userspace_get_wireguard_interfaces(struct string_list *list) { WIN32_FIND_DATA find_data; HANDLE find_handle; @@ -125,9 +125,7 @@ static int userspace_get_wireguard_interfaces(struct inflatable_buffer *buffer) do { if (strncmp("WireGuard\\", find_data.cFileName, 10)) continue; - buffer->next = strdup(find_data.cFileName + 10); - buffer->good = true; - ret = add_next_to_inflatable_buffer(buffer); + ret = string_list_add(list, find_data.cFileName + 10); if (ret < 0) goto out; } while (FindNextFile(find_handle, &find_data));