chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add _cleanup_globfree_
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index 2f66597de30c71e1ffda578a83a7cf1e98ef7c99..52867a177981bd6206c27ea92b4b65f192595f54 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-4322,7
+4322,7
@@
int in_group(const char *name) {
}
int glob_exists(const char *path) {
- glob_t
g
;
+ glob_t
_cleanup_globfree_ g = {}
;
int r, k;
assert(path);
@@
-4339,8
+4339,6
@@
int glob_exists(const char *path) {
else
r = errno ? -errno : -EIO;
- globfree(&g);
-
return r;
}