[C][Client] Fix memory leak when free a map (#8107)

This commit is contained in:
Hui Yu 2020-12-07 08:59:03 +08:00 committed by GitHub
parent 43fa47a51d
commit 3195338c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,6 +264,7 @@ void {{classname}}_free({{classname}}_t *{{classname}}) {
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
free (localKeyValue->key);
free (localKeyValue->value);
free (localKeyValue);
}
list_free({{classname}}->{{name}});
{{/isMap}}