diff options
author | 2017-11-15 17:05:47 -0800 | |
---|---|---|
committer | 2017-11-15 17:05:47 -0800 | |
commit | d21b96cbc75e7f9d6684907585a490b61325b63f (patch) | |
tree | 0eb5a9f924563f18a266be11e9d470b61a5b06bd /src/core/lib/transport/error_utils.cc | |
parent | 8c1f338b4ab55455d064920526127495bab96e6c (diff) |
Dup the memory
Diffstat (limited to 'src/core/lib/transport/error_utils.cc')
-rw-r--r-- | src/core/lib/transport/error_utils.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index 061445d44c..bcaedeeac9 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 <grpc/support/string_util.h> #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 |