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:
@@ -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.
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user