clean up small mem leak.

git-svn-id: svn://10.0.0.236/trunk@45205 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com
1999-08-30 22:18:23 +00:00
parent fc3ce85298
commit 003e325792
2 changed files with 4 additions and 2 deletions

View File

@@ -1403,7 +1403,7 @@ nsTextEditorDragListener::DragDrop(nsIDOMEvent* aMouseEvent)
// Note: the transferable owns the pointer to the data
nsCOMPtr<nsISupports> genericDataObj;
PRUint32 len;
char* whichFlavor;
char* whichFlavor = nsnull;
trans->GetAnyTransferData(&whichFlavor, getter_AddRefs(genericDataObj), &len);
nsCOMPtr<nsISupportsString> textDataObj( do_QueryInterface(genericDataObj) );
// If the string was not empty then paste it in
@@ -1417,6 +1417,7 @@ nsTextEditorDragListener::DragDrop(nsIDOMEvent* aMouseEvent)
dragSession->SetCanDrop(PR_TRUE);
}
delete [] whichFlavor;
// XXX This is where image support might go
//void * data;
//trans->GetTransferData(mImageDataFlavor, (void **)&data, &len);

View File

@@ -1403,7 +1403,7 @@ nsTextEditorDragListener::DragDrop(nsIDOMEvent* aMouseEvent)
// Note: the transferable owns the pointer to the data
nsCOMPtr<nsISupports> genericDataObj;
PRUint32 len;
char* whichFlavor;
char* whichFlavor = nsnull;
trans->GetAnyTransferData(&whichFlavor, getter_AddRefs(genericDataObj), &len);
nsCOMPtr<nsISupportsString> textDataObj( do_QueryInterface(genericDataObj) );
// If the string was not empty then paste it in
@@ -1417,6 +1417,7 @@ nsTextEditorDragListener::DragDrop(nsIDOMEvent* aMouseEvent)
dragSession->SetCanDrop(PR_TRUE);
}
delete [] whichFlavor;
// XXX This is where image support might go
//void * data;
//trans->GetTransferData(mImageDataFlavor, (void **)&data, &len);