Cause the netlib load to fail if OnStartBinding(...) returns an error.

git-svn-id: svn://10.0.0.236/trunk@4989 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rpotts
1998-07-03 06:15:06 +00:00
parent 00a860dea1
commit 5273f998d4

View File

@@ -482,7 +482,23 @@ NET_StreamBuilder (FO_Present_Types format_out,
printf("+++ Created a stream for %s\n", URL_s->address);
#endif
if (pConn->pConsumer) {
pConn->pConsumer->OnStartBinding(URL_s->content_type);
nsresult rv;
rv = pConn->pConsumer->OnStartBinding(URL_s->content_type);
/*
* If OnStartBinding fails, then tear down the NET_StreamClass
* and release all references...
*/
if (NS_OK != rv) {
NET_DropURLStruct(URL_s);
free(stream);
stream = NULL;
/*
* The NET_GetURL(...) exit_routine will clean up the
* nsConnectionInfo and associated objects.
*/
}
}
}
}