Skip to content

Commit

Permalink
osc-sdk-c: fix env not set to NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
ryohkhn committed Aug 13, 2024
1 parent 2ff849a commit 3c9969e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (struct osc_env){0};
char *ca = getenv("CURL_CA_BUNDLE");
char *endpoint;
char user_agent[sizeof "osc-sdk-c/" + OSC_SDK_VERSON_L];
Expand All @@ -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);

Expand Down

0 comments on commit 3c9969e

Please sign in to comment.