A flaw in something is a defect. At certain stores you can buy clothes with slight defects. You have to be careful because the defect can be minor, like a missing button, or major, like sleeves of uneven lengths.
In a person, a defect is an imperfection, which can manifest itself mentally or physically. If you are diagnosed with a heart defect, you will have to seek the advice of specialists. A hearing defect might leave your dad deaf in one ear. If you are becoming forgetful, you can joke that you are developing a mental defect, but if it continues, you'll probably want to have your head examined.