Fix bug 398880, getElementsByClassName('') leaks an nsVoidArray. r=sayrer, sr=jst, a=blocking1.9+.

This commit is contained in:
jruderman@hmc.edu 2007-11-06 22:46:35 -08:00
parent 1d384e219d
commit 028e550046

View File

@ -1738,6 +1738,8 @@ nsDocument::GetElementsByClassNameHelper(nsINode* aRootNode,
elements = new nsContentList(aRootNode, MatchClassNames,
DestroyClassNameArray, classes);
} else {
delete classes;
classes = nsnull;
elements = new nsBaseContentList();
}
if (!elements) {