title: Strange seg fault arrasing from adding another variable to structure
body: <p>Here is my structure:</p>
  
  <pre><code>typedef struct termNode{
      char term[41];
      int matched;
      struct termNode *next;
  } termNode;
  </code></pre>
  
  <p>It works fine with this code:</p>
  
  <pre><code>int add_term_to_list(char term[41]){
      int i = 0;  
      termNode *tmp = NULL;
      if(headTerm == NULL){
          if(create_head(term) != 0)
               return 1;
          else 
               return 0;
      }
      tmp = malloc(sizeof(termNode*));
      if(tmp == NULL)
          return 1;
      while(term[i] != '\n'){
          tmp -&gt; term[i] = term[i];
          i++;
      }
      tmp -&gt; term[i] = 0;
      tmp -&gt; matched = 0;
      tmp -&gt; next = NULL;
      currTerm -&gt; next = tmp;
      currTerm = tmp;
      return 0;
  }
  </code></pre>
  
  <p>However, if i add another variable to the structure:</p>
  
  <pre><code>typedef struct termNode{
          char term[41];
          int matched;
          int size;
          struct termNode *next;
      } termNode;
  </code></pre>
  
  <p>Then I get a segfault when I try to run. This is the only change in my code. Does anyone know why this happens? </p>
  
  <p>I update the code -> make clean -> make -> run and I get segfault.</p>