From 6194ec0fe89cd206a6e2162450be0ef8e39e939d Mon Sep 17 00:00:00 2001 From: "Jonathan M. Henson" Date: Tue, 17 Oct 2023 15:20:39 -0700 Subject: [PATCH] whhops again. --- source/linux/system_info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/linux/system_info.c b/source/linux/system_info.c index bdcbbc632..f6bfb858d 100644 --- a/source/linux/system_info.c +++ b/source/linux/system_info.c @@ -21,12 +21,12 @@ int aws_system_environment_load_platform_impl(struct aws_system_environment *env aws_byte_buf_init_from_file_with_size_hint( &env->product_name, env->allocator, "/sys/devices/virtual/dmi/id/product_name", 32 /*size_hint*/); - struct ifaddrs *addrs; - struct ifaddrs *iterator; - iterator = addrs; + struct ifaddrs *addrs = NULL; + struct ifaddrs *iterator = NULL; getifaddrs(&addrs); - + iterator = addrs; + while(iterator) { if (iterator->ifa_addr && iterator->ifa_addr->sa_family == AF_PACKET) { struct aws_string *device_name = aws_string_new_from_c_str(env->allocator, iterator->ifa_name);