mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
clean up small mem leak.
This commit is contained in:
parent
8ee7e4dbe3
commit
50f4479ca0
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user