small fix 14835 sr=jag r=pav very small chance of a memory leak in nsFrame

This commit is contained in:
mjudge%netscape.com 2002-09-12 10:35:46 +00:00
parent 48fb8951f4
commit 424de9b081
2 changed files with 6 additions and 2 deletions

View File

@ -343,8 +343,10 @@ SelectionImageService::CreateImage(nscolor aImageColor, imgIContainer *aContaine
return NS_ERROR_OUT_OF_MEMORY;
unsigned char *alpha = (unsigned char *)malloc(abpr);
if (!alpha)
{
free (row_data);
return NS_ERROR_OUT_OF_MEMORY;
}
unsigned char *data = row_data;
PRInt16 i;

View File

@ -343,8 +343,10 @@ SelectionImageService::CreateImage(nscolor aImageColor, imgIContainer *aContaine
return NS_ERROR_OUT_OF_MEMORY;
unsigned char *alpha = (unsigned char *)malloc(abpr);
if (!alpha)
{
free (row_data);
return NS_ERROR_OUT_OF_MEMORY;
}
unsigned char *data = row_data;
PRInt16 i;