
Freeing heap problem with jansson using C
By: a guest on
Jul 6th, 2012 | syntax:
C | size: 0.28 KB | hits: 13 | expires: Never
#include<stdio.h>
#include<malloc.h>
#include<jansson.h>
int main()
{
json_t * tuple;
char * test = (char *)malloc(200);
tuple= json_pack("{s:s}" , "key" , "121564456465");
test = json_dumps(tuple,0);
puts(test);
free(test);
json_decref(tuple);
return 0 ;
}