process: style changes (#1709)

This commit is contained in:
Takase 2024-01-21 10:18:32 +08:00 committed by GitHub
parent dd69d7b9d0
commit 0383e17475
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -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) { static void process_env_free(process_env_t *list, size_t list_len) {
if (!*list) return; if (!*list) return;
#ifdef _WIN32 #ifndef _WIN32
free(*list); for (size_t i = 0; i < list_len; i++)
#else free((*list)[i]);
for (size_t i = 0; i < list_len; i++) free((*list)[i]);
free(*list);
#endif #endif
free(*list);
*list = NULL; *list = NULL;
} }