title: Mallocing in a recursive function
body: <p>I have a function that is called recursively a number of times. Inside this function I malloc memory for a struct and pass it as an argument into the recursive call of this function. I am confused whether I can keep the name of the variable I am mallocing the same. Or is this going to be a problem?</p>
  
  <pre><code>struct Student{
       char *studentName;
       int studentAge;
    };
  
  recursiveFunction(*struct){ //(Whoever calls this function sends in a malloced struct)
      Student *structptr = malloc(sizeof(Student));
      &lt;Do some processing&gt;
               .
               .
     if(condition met){
         return;
     }
     else{
         recursiveFunction(structptr);
     }
  }
  
  free(){} // All malloced variables are free'd in another function
  </code></pre>
  
  <p>Would this be a problem since the name of the variable being malloced doesnt change in each recursive call. </p>