From d21b96cbc75e7f9d6684907585a490b61325b63f Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 15 Nov 2017 17:05:47 -0800 Subject: [PATCH] Dup the memory --- src/core/lib/transport/error_utils.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index 061445d44c3..bcaedeeac96 100644 --- a/src/core/lib/transport/error_utils.cc +++ b/src/core/lib/transport/error_utils.cc @@ -18,6 +18,7 @@ #include "src/core/lib/transport/error_utils.h" +#include #include "src/core/lib/iomgr/error_internal.h" #include "src/core/lib/transport/status_conversion.h" @@ -44,7 +45,7 @@ void grpc_error_get_status(grpc_exec_ctx* exec_ctx, grpc_error* error, grpc_slice* slice, grpc_http2_error_code* http_error, const char** full_error_details) { if (full_error_details != NULL) { - *full_error_details = grpc_error_string(error); + *full_error_details = gpr_strdup(grpc_error_string(error)); } // Start with the parent error and recurse through the tree of children