mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-09 15:14:01 +07:00
journal: fix memleak, call set_free before return
This commit is contained in:
parent
aa6eba407b
commit
4a207bb2a5
@ -60,7 +60,7 @@ static Set *new_matches(void) {
|
||||
tmp = strdup("MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1");
|
||||
if (!tmp) {
|
||||
log_oom();
|
||||
set_clear_free(set);
|
||||
set_free(set);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ static Set *new_matches(void) {
|
||||
if (r < 0) {
|
||||
log_error("failed to add to set: %s", strerror(-r));
|
||||
free(tmp);
|
||||
set_clear_free(set);
|
||||
set_free(set);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user