Added back in leak fix with NECKO ifdefs.

This commit is contained in:
warren%netscape.com 1999-07-27 04:30:34 +00:00
Родитель 8b8b9c3727
Коммит cdac747187
1 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -1010,9 +1010,15 @@ IL_StreamFirstWrite(il_container *ic, const unsigned char *str, int32 len)
FREE_IF_NOT_NULL(ic->fetch_url);
#ifdef NECKO
if (ic->url){
ic->fetch_url = ic->url->GetAddress();
}
#else
if((ic->url)&& ic->url->GetAddress()){
ic->fetch_url = PL_strdup(ic->url->GetAddress());
}
#endif
else{
if(ic->url_address) /* check needed because of mkicons.c */
ic->fetch_url = PL_strdup(ic->url_address);
@ -1041,6 +1047,7 @@ IL_StreamFirstWrite(il_container *ic, const unsigned char *str, int32 len)
case IL_XBM : PL_strcpy(imgtype, "xbm"); break;
case IL_JPEG : PL_strcpy(imgtype, "jpeg"); break;
case IL_PNG : PL_strcpy(imgtype, "png"); break;
case IL_ART : PL_strcpy(imgtype, "art"); break;
default : PL_strcpy(imgtype, "");
}
@ -1607,8 +1614,14 @@ IL_StreamCreated(il_container *ic,
ic->type = (int)type;
ic->content_length = url->GetContentLength();
ILTRACE(4,("il: new stream, type %d, %s", ic->type,
url->GetAddress()));
#ifdef NECKO
char* addr = url->GetAddress();
ILTRACE(4,("il: new stream, type %d, %s", ic->type, addr));
nsCRT::free(addr);
#else
ILTRACE(4,("il: new stream, type %d, %s", ic->type,
url->GetAddress()));
#endif
ic->state = IC_STREAM;
#ifndef M12N /* XXXM12N Fix me. */