dirload_service_set; correctly record service dir allocation.
authorDavin McCall <davmac@davmac.org>
Mon, 17 Sep 2018 17:32:12 +0000 (18:32 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 17 Sep 2018 17:32:12 +0000 (18:32 +0100)
The service directory can be allocated statically or dynamically (in
which case it is "owned" by the service set). Correctly track it for the
single-directory constructor.

src/includes/service.h

index 7d95848c6b91a1467f20fc1bda050eef61e8b4b8..b59815c903996831a3d44f7bc6f9f32b7de91ed1 100644 (file)
@@ -1003,7 +1003,7 @@ class dirload_service_set : public service_set
     // or statically allocated.
     dirload_service_set(const char *service_dir_p, bool dyn_allocd = false) : service_set()
     {
-        service_dirs.emplace_back(service_dir_p, false);
+        service_dirs.emplace_back(service_dir_p, dyn_allocd);
     }
 
     // Append a directory to the list of service directories, so that it is searched last for