summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/set.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/set.c b/src/shared/set.c
index c338dc3a44..5a4bf11bdf 100644
--- a/src/shared/set.c
+++ b/src/shared/set.c
@@ -50,9 +50,12 @@ int set_put(Set *s, void *value) {
}
int set_consume(Set *s, void *value) {
- int r = set_put(s, value);
+ int r;
+
+ r = set_put(s, value);
if (r < 0)
free(value);
+
return r;
}