From 80c9128c438070c7a5e17d92f064fe22aa3bcd58 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Sun, 21 Jan 2024 10:18:32 +0800 Subject: [PATCH] process: style changes (#1709) --- src/api/process.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/api/process.c b/src/api/process.c index 7b41135d..50cbd767 100644 --- a/src/api/process.c +++ b/src/api/process.c @@ -562,12 +562,11 @@ static int process_env_add(process_env_t *env_list, size_t *env_len, const char static void process_env_free(process_env_t *list, size_t list_len) { if (!*list) return; -#ifdef _WIN32 - free(*list); -#else - for (size_t i = 0; i < list_len; i++) free((*list)[i]); - free(*list); +#ifndef _WIN32 + for (size_t i = 0; i < list_len; i++) + free((*list)[i]); #endif + free(*list); *list = NULL; }