summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-19 16:43:03 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-20 00:01:05 +0100
commit575ccc1b6900f1f8e5c32da71f42f4d855659622 (patch)
tree48765d26c703f9ba9d61c50ed37c77cf10a2e4dc /src/shared
parenta1ad376761af16da46c9ad90fd8df41c8c5c0976 (diff)
set: make set_consume() actually free the allocated string if the string already is in the set
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c
index 2bc3b38739..5b329e0851 100644
--- a/src/shared/hashmap.c
+++ b/src/shared/hashmap.c
@@ -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;