Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MEM01-EX1: If the variable goes out of scope immediately following the free(), it is not necessary to clear its value since because it will is no longer be accessible.

Code Block
bgColor#ccccff
void foo() {
  char *str;
  /* ... */
  free(str);
  return;
}

...