title: Why I get double free?
body: <p>Here is my code. I  try to malloc the element that been malloc, and I don't know how to free them.</p>
  <pre><code>char *d = &quot;apple&quot;;
  int main() {            
    char *a = malloc(10 * sizeof(char));
    char **b = &amp;a;
    strcpy(a,d);
    printf(&quot;%c&quot;, *b[0]);
    b[0] = malloc(3 * sizeof(char));
    free(b[0]);
    free(a);
  }
  </code></pre>