Fix memory leak (I think)
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 37cc2bd..ad8ee8c 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -685,10 +685,14 @@
grpc_call_element *elem = user_data;
call_data *calld = elem->call_data;
if (md->key == GRPC_MDSTR_PATH) {
- calld->path = GRPC_MDSTR_REF(md->value);
+ if (calld->path == NULL) {
+ calld->path = GRPC_MDSTR_REF(md->value);
+ }
return NULL;
} else if (md->key == GRPC_MDSTR_AUTHORITY) {
- calld->host = GRPC_MDSTR_REF(md->value);
+ if (calld->host == NULL) {
+ calld->host = GRPC_MDSTR_REF(md->value);
+ }
return NULL;
}
return md;