capinfos: fix leak of message digest handle