chiark / gitweb /
manager: use correct cleanup function
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Thu, 11 Sep 2014 19:14:53 +0000 (21:14 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Thu, 11 Sep 2014 19:22:45 +0000 (21:22 +0200)
Close the dir instead of attempt to free it.

Introduced in 874310b7b68c4c0d36ff07397db30a959bb7dae5

Found with coverity. Fixes: CID#996368

src/core/manager.c

index 9abdf475cf1ea9404a21a409837680eaee16daf2..095111e8c656f93b0ea5fdd876e8bfb1b0a641e2 100644 (file)
@@ -896,7 +896,7 @@ static int manager_coldplug(Manager *m) {
 
 static void manager_build_unit_path_cache(Manager *m) {
         char **i;
-        _cleanup_free_ DIR *d = NULL;
+        _cleanup_closedir_ DIR *d = NULL;
         int r;
 
         assert(m);