title: Where should I call Free() function?
body: <p>For example:<br/>
  <hr/>
  In A.c :</p>
  
  <pre><code>Head init(){
  Head treeHead;
  treeHead = malloc(sizeof (struct TreeHead));
  treeHead-&gt;Root = malloc(sizeof (struct TreeNode));
  return treeHead;}
  </code></pre>
  
  <p><hr/>
  In B.c :</p>
  
  <pre><code>Head treeHead;
  treeHead = init();
  </code></pre>
  
  <p><hr/>
  Should I call free in init() method in A.c or in B.c ?</p>