git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
159fdb0
)
nwrap: Cleanup shadow getspnam() memory
author
Andreas Schneider
<asn@samba.org>
Thu, 19 Nov 2015 08:02:46 +0000
(09:02 +0100)
committer
Michael Adam
<obnox@samba.org>
Mon, 11 Jan 2016 11:25:32 +0000
(12:25 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
lib/nss_wrapper/nss_wrapper.c
patch
|
blob
|
history
diff --git
a/lib/nss_wrapper/nss_wrapper.c
b/lib/nss_wrapper/nss_wrapper.c
index 562efba251509114fab02304579957f96c005381..914cd26e3fbd9f7ebbdab1b9bca8b24fceff4a0c 100644
(file)
--- a/
lib/nss_wrapper/nss_wrapper.c
+++ b/
lib/nss_wrapper/nss_wrapper.c
@@
-5551,6
+5551,18
@@
void nwrap_destructor(void)
nwrap_pw_global.num = 0;
}
+ if (nwrap_sp_global.cache != NULL) {
+ struct nwrap_cache *c = nwrap_sp_global.cache;
+
+ nwrap_files_cache_unload(c);
+ if (c->fd >= 0) {
+ fclose(c->fp);
+ c->fd = -1;
+ }
+
+ nwrap_he_global.num = 0;
+ }
+
if (nwrap_he_global.cache != NULL) {
struct nwrap_cache *c = nwrap_he_global.cache;