Versions Compared

Key

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

...

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

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

...