mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-28 17:10:23 +00:00
set: make set_consume() actually free the allocated string if the string already is in the set
This commit is contained in:
@@ -1810,7 +1810,7 @@ int set_consume(Set *s, void *value) {
|
||||
int r;
|
||||
|
||||
r = set_put(s, value);
|
||||
if (r < 0)
|
||||
if (r <= 0)
|
||||
free(value);
|
||||
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user