It's more the case that the memory pointed to is globally accessible. A given pointer variable can be global or local like any other variable.
So if you allocate memory using a local variable, and it goes out of scope before the address is either passed to another variable or the memory deleted, then you have no way of getting at or freeing the block of memory that you allocated (ie a memory leak)