OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 #include "primpl.h" | 6 #include "primpl.h" |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 /*****************************************************************************/ | 10 /*****************************************************************************/ |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 _pr_fd_cache.limit_high = _pr_fd_cache.limit_low; | 206 _pr_fd_cache.limit_high = _pr_fd_cache.limit_low; |
207 | 207 |
208 _pr_fd_cache.ml = PR_NewLock(); | 208 _pr_fd_cache.ml = PR_NewLock(); |
209 PR_ASSERT(NULL != _pr_fd_cache.ml); | 209 PR_ASSERT(NULL != _pr_fd_cache.ml); |
210 | 210 |
211 } /* _PR_InitFdCache */ | 211 } /* _PR_InitFdCache */ |
212 | 212 |
213 void _PR_CleanupFdCache(void) | 213 void _PR_CleanupFdCache(void) |
214 { | 214 { |
215 PRFileDesc *fd, *next; | 215 PRFileDesc *fd, *next; |
216 PRStackElem *pop; | |
217 | 216 |
218 for (fd = _pr_fd_cache.head; fd != NULL; fd = next) | 217 for (fd = _pr_fd_cache.head; fd != NULL; fd = next) |
219 { | 218 { |
220 next = fd->higher; | 219 next = fd->higher; |
221 PR_DELETE(fd->secret); | 220 PR_DELETE(fd->secret); |
222 PR_DELETE(fd); | 221 PR_DELETE(fd); |
223 } | 222 } |
224 _pr_fd_cache.head = NULL; | 223 _pr_fd_cache.head = NULL; |
225 _pr_fd_cache.tail = NULL; | 224 _pr_fd_cache.tail = NULL; |
226 _pr_fd_cache.count = 0; | 225 _pr_fd_cache.count = 0; |
227 PR_DestroyLock(_pr_fd_cache.ml); | 226 PR_DestroyLock(_pr_fd_cache.ml); |
228 _pr_fd_cache.ml = NULL; | 227 _pr_fd_cache.ml = NULL; |
229 } /* _PR_CleanupFdCache */ | 228 } /* _PR_CleanupFdCache */ |
230 | 229 |
231 /* prfdcach.c */ | 230 /* prfdcach.c */ |
OLD | NEW |