下列代码运行出错,可能会是哪一行引起的?
void getMemory(char *p) {
p = (char *)malloc(100); // 1
}
int main(int argc, char const *argv[]) {
char *str = NULL;
getMemory(str);
strcpy(str, "hello wrold"); // 2
printf("%s\n", str); // 3
free(str); // 4
} 



