Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 26, 2014
1 parent e50231f commit 03d3b55
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/modules/rlm_rest/rest.c
Expand Up @@ -2142,27 +2142,29 @@ void rest_request_cleanup(UNUSED rlm_rest_t *instance, UNUSED rlm_rest_section_t
CURL *candle = randle->handle;

/*
* Clear any previously configured options
*/
curl_easy_reset(candle);
* Clear any previously configured options
*/
curl_easy_reset(candle);

/*
* Free header list
*/
if (ctx->headers != NULL) {
curl_slist_free_all(ctx->headers);
ctx->headers = NULL;
}
* Free header list
*/
if (ctx->headers != NULL) {
curl_slist_free_all(ctx->headers);
ctx->headers = NULL;
}

/*
* Free body data (only used if chunking is disabled)
*/
if (ctx->body != NULL) free(ctx->body);

/*
* Free other context info
*/
rest_response_free(&ctx->response);
* Free body data (only used if chunking is disabled)
*/
if (ctx->body != NULL) {
free(ctx->body);
ctx->body = NULL;
}
/*
* Free other context info
*/
rest_response_free(&ctx->response);
}

/** URL encodes a string.
Expand Down

0 comments on commit 03d3b55

Please sign in to comment.