MCPcopy Create free account
hub / github.com/git/git / attr_stack_free

Function attr_stack_free

attr.c:439–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437};
438
439static void attr_stack_free(struct attr_stack *e)
440{
441 unsigned i;
442 free(e->origin);
443 for (i = 0; i < e->num_matches; i++) {
444 struct match_attr *a = e->attrs[i];
445 size_t j;
446
447 for (j = 0; j < a->num_attr; j++) {
448 const char *setto = a->state[j].setto;
449 if (setto == ATTR__TRUE ||
450 setto == ATTR__FALSE ||
451 setto == ATTR__UNSET ||
452 setto == ATTR__UNKNOWN)
453 ;
454 else
455 free((char *) setto);
456 }
457 free(a);
458 }
459 free(e->attrs);
460 free(e);
461}
462
463static void drop_attr_stack(struct attr_stack **stack)
464{

Callers 2

drop_attr_stackFunction · 0.85
prepare_attr_stackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected