summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-12 12:15:49 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-13 17:56:54 -0400
commitb47d419c25ecc735615a1088060c1ec8bef1e41f (patch)
tree13940040841fbec3a928f82426390654e4b50fcc /src/shared/install.c
parent7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 (diff)
Modernization
Fixes minor leak in error path in device.c.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 9722ed4e1c..5a780fe915 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1874,6 +1874,7 @@ static void unitfilelist_free(UnitFileList **f) {
free((*f)->path);
free(*f);
}
+#define _cleanup_unitfilelist_free_ _cleanup_(unitfilelist_free)
int unit_file_get_list(
UnitFileScope scope,
@@ -1925,8 +1926,7 @@ int unit_file_get_list(
for (;;) {
struct dirent *de;
union dirent_storage buffer;
- UnitFileList __attribute__((cleanup(unitfilelist_free)))
- *f = NULL;
+ _cleanup_unitfilelist_free_ UnitFileList *f = NULL;
r = readdir_r(d, &buffer.de, &de);
if (r != 0)