Maryland officials have uncovered a second case of a defeated public official receiving unemployment benefits because he lost at the polls, and a review of Maryland Employment Security Administration files for other such cases is under way, officials said Friday.

A state law prohibits such payments to defeated officeholders, and officials said in Baltimore that the payments that have been made in two such cases apparently were the result of errors during the processing of the claims.

In both cases, the politicians clearly stated they had recently lost elections, and state officials were aware of their backgrounds.

Luther W. Starnes, executive assistant to the state secretary of human resources, confirmed that Patrick J. Duffy, who was Baltimore city register of wills until his defeat in last year's primary, received $23 a week in unemployment compensation between December of last year and June of this year--a total of $598.

Duffy said he did not know about the law when he applied for benefits last December. "If I wasn't entitled to it, I owe them and I'll give it back tomorrow," he said.

Earlier last week, officials ruled that former state delegate Frank M. Conaway must repay $3,978 he received in unemployment benefits after his defeat at the polls last fall.