From: Ralph Corderoy Date: Tue, 18 Oct 2016 12:37:14 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d253d4786c1712e9015474fae318e4e0a239ba88?hp=88a0a47b98a8810bb585e4ae57c5e704087744cd Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/sbr/oauth.c b/sbr/oauth.c index 2aedf82c..00e5ba21 100755 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -142,7 +142,7 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res, if (log != NULL) mh_oauth_log_to(stderr, ctx); - fn = getcpy(mh_oauth_cred_fn(svc)); + fn = mh_xstrdup(mh_oauth_cred_fn(svc)); fp = lkfopendata(fn, "r+", &failed_to_lock); if (fp == NULL) { if (errno == ENOENT) { @@ -182,7 +182,7 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res, free(fn); /* XXX writeBase64raw modifies the source buffer! make a copy */ - client_res = getcpy(mh_oauth_sasl_client_response(oauth_res_len, user, + client_res = mh_xstrdup(mh_oauth_sasl_client_response(oauth_res_len, user, cred)); mh_oauth_cred_free(cred); mh_oauth_free(ctx);