If you assign string literals, the type should be const char*, not char*.
And realize that string literals are pointers! So you allocate memory and assign its address to a pointer, then you later assign a new address to the pointer, overwriting the old address. Memory leak!
You cannot assign strings in C, you can only assign string literals. What does this mean? You can assign the address of a string (string literal) to a pointer, but you cannot copy a string you assignment:

Code:
char arr[50];
arr = "My string"; // Error, cannot copy string
const char* p;
p = "My string"; // OK, assigns the address where "My string" resides to p.
char* p2;
p2 = "My string"; // Bad, string literals should be const.
p2 = malloc(50);
p2 = "My string"; // Bad, memory leak.
To copy a string, use strcpy.