title: Deallocating void double pointer
body: <p>How would I deallocate a void double pointer?</p>
  
  <p><code>deallocate(void** ptr)</code></p>
  
  <p>This is the case I am trying to test against:</p>
  
  <p><code>char* allocated = (char*)allocate_array(sizeof(char), BUFSIZ,0);</code> </p>
  
  <p><code>deallocate_array((void**)&amp;allocated);</code></p>
  
  <p>I need to check to see if the ptr is not NULL so here is my attempt:</p>
  
  <pre><code>if(ptr != NULL &amp;&amp; *ptr != NULL){
        free(*ptr);
  }
  ptr = NULL;
  return;
  </code></pre>