The guy who couldn't remember Elaine Benes on "Seinfeld" is having serious issues with an ex-writer from the show ... and he's gone to court for protection.
Fred Stoller, who guest starred and wrote for the sitcom, filed for a restraining order against Bruce Kirschbaum, saying he'd been harassing him for months. Fred says Bruce shows up to his crib at all hours of the night, banging on his door and leaving threatening notes.
In docs, Fred says Bruce -- who was also "Seinfeld" writer -- blames him for ruining his rep in the biz.
Fred wrote a book about his time on "Seinfeld," in which he referred to an unnamed staffer as a "pathological liar." Bruce seems to think it was a shot at him.
A judge is ordering Bruce to cease all harassment. There's a hearing later this month to determine if he has to stay away from Fred.