title: Adding a node to a hash table
body: <p>When I'm trying to add my node to my hash table I'm getting seg fault. I've used gdb but can't pin point why I'm getting this error.</p>
  
  <pre><code>int symbol_add (sym_table_t* symTab, const char* name, int addr) {
    int hash = 0;
    int index = 0;    
    if(symbol_search(symTab, name, &amp;hash, &amp;index) == NULL){
      struct node pointer = calloc (1,sizeof(struct node));
      pointer-&gt;symbol.name = strdup(name);
      pointer-&gt;symbol.addr = addr;
      pointer-&gt;hash = hash;
      pointer-&gt;next = symTab -&gt; hash_table[index];
      symTab-&gt;hash_table[index] = pointer;
      return 1;
    }
  
    return 0;
  }
  </code></pre>