free pointer by other pointer points same memory

前端 未结 0 688
野性不改
野性不改 2020-12-06 14:39

Is the code down below possible?

int *a_p = malloc(sizeof(int));
int *b_p = a_p;
free(b_p);         //Free a_b by using b_p
a_p = b_p = NULL;

相关标签:
回答
  • 消灭零回复
提交回复
热议问题