Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: nspr/pr/src/linking/prlink.c

Issue 68173008: Update to NSPR 4.10.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Update README.chromium Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nspr/pr/src/io/prsocket.c ('k') | nspr/pr/src/md/unix/unix_errors.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nspr/pr/src/linking/prlink.c
===================================================================
--- nspr/pr/src/linking/prlink.c (revision 233722)
+++ nspr/pr/src/linking/prlink.c (working copy)
@@ -959,12 +959,19 @@
int result = 0;
PRStatus status = PR_SUCCESS;
- if ((lib == 0) || (lib->refCount <= 0)) {
+ if (lib == 0) {
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return PR_FAILURE;
}
PR_EnterMonitor(pr_linker_lock);
+
+ if (lib->refCount <= 0) {
+ PR_ExitMonitor(pr_linker_lock);
+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
+ return PR_FAILURE;
+ }
+
if (--lib->refCount > 0) {
PR_LOG(_pr_linker_lm, PR_LOG_MIN,
("%s decr => %d",
« no previous file with comments | « nspr/pr/src/io/prsocket.c ('k') | nspr/pr/src/md/unix/unix_errors.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698