Many financial institutions provide loans to secondary firms, whose economic survival depends on the economic condition of primary firms. Even if loans from primary firms are not held in the loan portfolio, the financial distress of primary firms can adversely affect the loan portfolio of a financial institution. This paper describes a simple model that can be used for risk management. Our model directly incorporates the dependence of the conditional probability of default and loss given default of secondary firms on primary firms. Two simple examples show that failure to account for such dependence can result in the value-at-risk and the expected shortfall being greatly underestimated.