diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2022-05-08 17:10:44 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2022-05-08 17:10:44 -0500 |
commit | 5ffa1c7fd741b39d8a626157a2bc9f086fe12ec8 (patch) | |
tree | 7898d29f66ed4126f1f439c832aff4139e2afd1f /src/librc/librc.c | |
parent | 026472ce5ee4303e8a1a8d791ef203deed166e0f (diff) |
librc: fix resource leaks
Diffstat (limited to 'src/librc/librc.c')
-rw-r--r-- | src/librc/librc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index 027d3fc1..7802cc41 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -947,9 +947,11 @@ rc_services_in_runlevel(const char *runlevel) #ifdef RC_PKG_INITDIR TAILQ_CONCAT(list, pkg, entries); + rc_stringlist_free(pkg); #endif #ifdef RC_LOCAL_INITDIR TAILQ_CONCAT(list, local, entries); + rc_stringlist_free(local); #endif return list; } @@ -1007,6 +1009,7 @@ rc_services_in_state(RC_SERVICE state) services = ls_dir(dir, LS_INITD); if (services) { TAILQ_CONCAT(list, services, entries); + rc_stringlist_free(services); } } rc_stringlist_free(dirs); |