IIRC, there should be a square U shaped retaining clip that pushes into a slot where the end of the flexible hose meets the end of the metal brake line. The retaining clip pushes against the right angled bracket slides into a slot in the metal section where the two pipes meet.
The retaining clip is not flat so there is a small amount of pressure pushing against the right angled bracket. This is what holds the pipe in place. Normally to insert/remove the clip you grab it with suitable pliers and give it a good wiggle to get it in/out of place.
Yes, these clips do rust and it sounds like the tab on the end of the retaining clip may have rusted away.
I have to remove mine when I get home as I'm replacing all the rubber brake hoses. I have lots of spare clips so if you need some just shout and I'll throw some in the post.