Pointer's error?

p is allocate, *p is not.

p contains a address (pointer) but you did not allocated a space and attributed the beginning of that space to p