Skip to content
Permalink
Browse files

tool_getparam: Fix C90 violations

  • Loading branch information
bbakersmith committed Feb 14, 2020
1 parent 4a80ff9 commit f17af3aa6e0cf116431b2afcde2b153934110c34
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/tool_getparam.c
@@ -1416,6 +1416,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
char *enc = curl_easy_escape(NULL, postdata, (int)size);
Curl_safefree(postdata); /* no matter if it worked or not */
if(enc) {
size_t outlen;
char *n;

/* fix space encoding per RFC1866 */
char *reenc = replace_url_encoded_space_with_plus(enc);
curl_free(enc);
@@ -1424,8 +1427,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */

/* now make a string with the name from above and append the
encoded string */
size_t outlen = nlen + strlen(reenc) + 2;
char *n = malloc(outlen);
outlen = nlen + strlen(reenc) + 2;
n = malloc(outlen);
if(!n) {
curl_free(reenc);
return PARAM_NO_MEM;

0 comments on commit f17af3a

Please sign in to comment.
You can’t perform that action at this time.