mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
Use hashmap_free_free where appropriate
This commit is contained in:
parent
fbdb6605b5
commit
ec1d290903
@ -1978,7 +1978,6 @@ fail:
|
||||
_public_ void sd_journal_close(sd_journal *j) {
|
||||
Directory *d;
|
||||
JournalFile *f;
|
||||
char *p;
|
||||
|
||||
if (!j)
|
||||
return;
|
||||
@ -2006,9 +2005,7 @@ _public_ void sd_journal_close(sd_journal *j) {
|
||||
mmap_cache_unref(j->mmap);
|
||||
}
|
||||
|
||||
while ((p = hashmap_steal_first(j->errors)))
|
||||
free(p);
|
||||
hashmap_free(j->errors);
|
||||
hashmap_free_free(j->errors);
|
||||
|
||||
free(j->path);
|
||||
free(j->prefix);
|
||||
|
@ -97,10 +97,7 @@ static void test_mnt_id(void) {
|
||||
assert_se(path_equal_ptr(hashmap_get(h, INT_TO_PTR(mnt_id2)), p));
|
||||
}
|
||||
|
||||
while ((p = hashmap_steal_first(h)))
|
||||
free(p);
|
||||
|
||||
hashmap_free(h);
|
||||
hashmap_free_free(h);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user