This is a code inspection bug. QA: To verify that this bug is fixed, make sure that all callers in of PL_DHashTableInit in the indicated class/file check and handle a failure return result. To verify that this bug is invalid, simply verify (e.g. with lxr) that PL_DHashTableInit is no longer used by the indicated class/file. PL_DHashTableInit returns a PRBool indicating whether it succeeded. PL_DHashTableInit *can* fail. Code can not assume that table->ops or table- >data will be null (in fact it probably will not be), although in all likelyhood table->entryStore will be null it probably isn't safe to assume this. Code at time of bug filing: 558 gSocketThread = PR_GetCurrentThread(); 559 560 // 561 // Initialize hostname database 562 // 563 PL_DHashTableInit(&mHostDB, &ops, nsnull, sizeof(nsHostEntry), 0);
Comment on attachment 126857 [details] [diff] [review] patch. you don't really need to clear ops because only Run uses the hashtable and it cleans it up.
thanks for the patch suresh... i've actually already incorporated (roughly) this into some changes i am making to that function right now for another bug (bug 205726).
Depends on: 205726
this is fixed now that the patch for bug 205726 has landed.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.