aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/security
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nnoble@google.com>2015-01-26 17:03:08 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2015-01-26 17:03:08 -0800
commitf66ccc44d7509303a22a5ed602b366d436864afd (patch)
tree440b5572ae86ebebee04f8878eeb76be802eec4e /test/core/security
parente04455a7ff1ead05445daa95d7bc822a7f40b6f5 (diff)
parent49724152edc6907fa4b872f9e7580d4b78a06f77 (diff)
Merge branch 'master' of github.com:google/grpc into json
Diffstat (limited to 'test/core/security')
-rw-r--r--test/core/security/credentials_test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index fbad52d1f6..dd90a7edc8 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -498,10 +498,8 @@ static void validate_service_account_http_request(
char *expected_body = NULL;
GPR_ASSERT(body != NULL);
GPR_ASSERT(body_size != 0);
- expected_body = gpr_malloc(strlen(expected_service_account_http_body_prefix) +
- strlen(test_signed_jwt) + 1);
- sprintf(expected_body, "%s%s", expected_service_account_http_body_prefix,
- test_signed_jwt);
+ gpr_asprintf(&expected_body, "%s%s",
+ expected_service_account_http_body_prefix, test_signed_jwt);
GPR_ASSERT(strlen(expected_body) == body_size);
GPR_ASSERT(!memcmp(expected_body, body, body_size));
gpr_free(expected_body);