title: json_decref() cause memory Invalid write
body: <p>I got some problems when I call json_decref()</p>
  
  <pre><code>#include &lt;jansson.h&gt;
  #include &lt;stdio.h&gt;
  
  void main()
  {
      json_t *aa, *bb, *cc, *dd;
  
      aa = json_load_file ("/home/cuihaikuo/demo.json", JSON_STRICT, NULL);
      bb = json_array_get (aa, 0); 
      if (bb != NULL) 
          json_decref (bb);
      if (aa != NULL)
          json_decref (aa);
  
  }
  </code></pre>
  
  <p>I use vargrind running the program, it says Invalid write of size 8</p>
  
  <pre><code>==2641== Invalid write of size 8
  ==2641==    at 0x4E4201A: json_delete (in /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0)
  ==2641==    by 0x4006C3: json_decref (in /home/cuihaikuo/chk/test/a)
  ==2641==    by 0x400721: main (in /home/cuihaikuo/chk/test/a)
  ==2641==  Address 0x5412438 is 8 bytes inside a block of size 48 free'd
  ==2641==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  ==2641==    by 0x4006C3: json_decref (in /home/cuihaikuo/chk/test/a)
  ==2641==    by 0x40070E: main (in /home/cuihaikuo/chk/test/a)
  </code></pre>
  
  <p>if I comment out <code>json_decref (aa);</code>, it will lead a memory leak, how to explain it and what should I do? </p>