chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a1ad376
)
set: make set_consume() actually free the allocated string if the string already...
author
Lennart Poettering
<lennart@poettering.net>
Wed, 19 Nov 2014 15:43:03 +0000
(16:43 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 19 Nov 2014 23:01:05 +0000
(
00:01
+0100)
src/shared/hashmap.c
patch
|
blob
|
history
diff --git
a/src/shared/hashmap.c
b/src/shared/hashmap.c
index 2bc3b38739a093e6515b4cdfcec62a02cff7cade..5b329e0851fd80287539f0e985068b87fdd9222f 100644
(file)
--- 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);
int r;
r = set_put(s, value);
- if (r < 0)
+ if (r <
=
0)
free(value);
return r;
free(value);
return r;