Fix memory leak in failed metadata preparation

pull/6160/head
Craig Tiller 9 years ago
parent b42445c00e
commit 3ec4b83f7a
  1. 2
      src/core/lib/surface/call.c

@ -576,7 +576,7 @@ static int prepare_application_metadata(grpc_call *call, int count,
} }
if (i != count) { if (i != count) {
for (int j = 0; j <= i; j++) { for (int j = 0; j <= i; j++) {
grpc_metadata *md = &metadata[i]; grpc_metadata *md = &metadata[j];
grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data; grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data;
GRPC_MDELEM_UNREF(l->md); GRPC_MDELEM_UNREF(l->md);
} }

Loading…
Cancel
Save