title: Why do I not need to free memory when creating a char* using "Quotes"
body: <p>I ran into a terrible error in testing some code. I figured out that it was caused by calling <code>free(p_current_item-&gt;s)</code> where <code>p_current_item</code> is a node in a linked list, and s is the char* it contains. I created the node by calling a method addItem(node,char*) which simply adds the element to the list: <code>p_head=addItem(p_head,"this gets added");</code>
  What is bothering me is:</p>
  
  <p>1) Why I would need to free the string contained in the element. I know it is necessary when s is declared as <code>char* s = snprintf(s,(size_t),30,"this gets added");</code> (which is how it was done in my class example) but why is that necessary- is it possible to have the attributes contained within a struct (in this case the linkedList node) be freed when the struct itself is freed?</p>
  
  <p>2) what was happening when I tried to free the value of s which was explicitly declared</p>
  
  <p>3) Do i need to free up the value of s some other way?</p>
  
  <p>Thanks :-)</p>