Is "connected_addr" declared somewhere in code? (I will assume yes)
Why not pass the "addr" array pointer instead for debug purposes to ensure the value is being copied to the passed array?
Otherwise, the only thing I can think of without seeing the whole project is that you are passing a pointer to a pointer to the address array where you want the address stored rather than passing the pointer to the array. (mismatch in the number of pointer abstraction levels to the address memory location)
I think the "problem" is the fact that newest Android versions and all iOS devices use a random resolvable address when they connect to a peripheral device and that is why you receive different addresses between connections. I myself have some problems with this but the other way around, when I try to use for my PSoC a private random resolvable address.
Hope this is helpful.
The "random" addresses are part of the random resolveable addresses to implement privacy on newer phones (Otherwise you can track device movement and connections/usage).
Here's a thread that covers working with random resolveable addresses (if the address from the iOS/Android is not resolveable, then there is nothing you can do to deal with authenticating the device based on the address alone)
Here's a thread with some similar information: