diff options
author | Robert Mustacchi <rm@joyent.com> | 2017-11-09 18:24:48 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2018-02-20 20:00:37 +0000 |
commit | d1e6ffe20e2ccf6a38cfbe4d1bc3a20b92d37fd1 (patch) | |
tree | 40358b3b2be2a5a674bbff991aa3f891a9deab0f /usr/src/lib/nsswitch/files/common/files_common.c | |
parent | 3a2d8a1b18794077eff4c504197c1d6f9d7ee487 (diff) | |
download | illumos-gate-d1e6ffe20e2ccf6a38cfbe4d1bc3a20b92d37fd1.tar.gz |
9052 nss_files exec attr search leaks memory on dlclose
Reviewed by: Tim Kordas <tim.kordas@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Diffstat (limited to 'usr/src/lib/nsswitch/files/common/files_common.c')
-rw-r--r-- | usr/src/lib/nsswitch/files/common/files_common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/lib/nsswitch/files/common/files_common.c b/usr/src/lib/nsswitch/files/common/files_common.c index 4755aec86b..5892ed1430 100644 --- a/usr/src/lib/nsswitch/files/common/files_common.c +++ b/usr/src/lib/nsswitch/files/common/files_common.c @@ -24,6 +24,7 @@ */ /* * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2017, Joyent, Inc. */ /* @@ -738,3 +739,15 @@ _nss_files_check_name_aliases(nss_XbyY_args_t *argp, const char *line, } return (0); } + +/* + * A few NSS modules hold onto data for the duration of their module. In this + * case, when that module goes away, we must free that data. This is a place + * that allows for modules to register items to take care of. + */ +#pragma fini(_nss_files_fini) +static void +_nss_files_fini(void) +{ + getexecattr_fini(); +} |