From 0703f9a090c31478027b9f5599e92a739f894bb4 Mon Sep 17 00:00:00 2001 From: Lucas RODRIGUEZ Date: Mon, 12 Aug 2024 15:31:39 +0000 Subject: [PATCH] osc-sdk-c: fix env not set to NULL --- lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib.c b/lib.c index fcedcd1..60de92f 100644 --- a/lib.c +++ b/lib.c @@ -503,6 +503,7 @@ static inline char *cfg_pass(struct osc_env_conf *cfg) int osc_init_sdk_ext(struct osc_env *e, const char *profile, unsigned int flag, struct osc_env_conf *cfg) { + *e = (osc_env e){0}; char *ca = getenv("CURL_CA_BUNDLE"); char *endpoint; char user_agent[sizeof "osc-sdk-c/" + OSC_SDK_VERSON_L]; @@ -516,8 +517,6 @@ int osc_init_sdk_ext(struct osc_env *e, const char *profile, unsigned int flag, e->region = getenv("OSC_REGION"); e->flag = flag; e->auth_method = cfg ? cfg->auth_method : OSC_AKSK_METHOD; - e->proxy = NULL; - e->endpoint_allocated_ = NULL; endpoint = getenv("OSC_ENDPOINT_API"); osc_init_str(&e->endpoint);