title: The lifespan of memory allocated by the malloc() function
body: <p>If I pass to a function a pointer where the pointer gets an address to allocated memory, is the memory freed when the function exits?</p>
  
  <pre><code>void initWomenList(Women **head, Women *headWoman) {        
    headWoman = (Women *) malloc(sizeof(Women));
    if (headWoman == NULL) {
        printf("Allocation of headWoman failed\n");
        exit(1);
    }
    headWoman-&gt;userWoman = NULL;
    headWoman-&gt;next = NULL;
  
    head = &amp;headWoman;
  }
  </code></pre>
  
  <p>Are both head and headWoman NULL when the function returns?</p>