Full stack server fuzzer #6071

Merged
merged 54 commits into from Apr 6, 2016
Commits
+6 −2
Split
Viewing a subset of changes. View all

Fix memory leak (I think)

commit 9cac2a12d9e181d130841092e9d40fa3309d7aa7 @ctiller ctiller committed Apr 5, 2016
@@ -685,10 +685,14 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
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;