title: What does free do to a pointer passed by value to a function?
body: <p>It is known that if we pass a pointer by value to a function, it cannot be freed inside the function, like so:</p>
  
  <pre><code>void func(int *p)
  {
      free(p);
      p = NULL;
  }
  </code></pre>
  
  <p>p holds a copy of a (presumably valid) address, so free(p) tries to, well, free it. But since it is a copy, it cannot really free it. How does the call to free() know that it cannot really free it ? </p>
  
  <p>The code above does not produce an error. Does that mean free() just fails silently, "somehow" knowing that address passed in as argument cannot be worked upon ?</p>