MCPcopy Create free account
hub / github.com/coreboot/coreboot / kv_pair_free

Function kv_pair_free

util/cbfstool/flashmap/kv_pair.c:101–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void kv_pair_free(struct kv_pair *kv_list)
102{
103 struct kv_pair *kv_ptr = kv_list;
104 struct kv_pair *kv_next;
105
106 while (kv_ptr != NULL) {
107 /* free key/value strings */
108 if (kv_ptr->key)
109 free(kv_ptr->key);
110 if (kv_ptr->value)
111 free(kv_ptr->value);
112
113 /* free current pair move to next */
114 kv_next = kv_ptr->next;
115 free(kv_ptr);
116 kv_ptr = kv_next;
117 }
118}
119
120void kv_pair_print_to_file(FILE* fp, struct kv_pair *kv_list,
121 enum kv_pair_style style)

Callers 2

fmap_printFunction · 0.85
kv_pair_addFunction · 0.85

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected