const char *htsmsg_get_cdata(htsmsg_t *m, const char *field);
-extern void htsmsg_dtor(htsmsg_t **mp);
-
-#define htsmsg_autodtor(n) htsmsg_t *n __attribute__((cleanup(htsmsg_dtor)))
if(op == NULL)
return 400;
- htsmsg_autodtor(in) =
+ htsmsg_t *in =
entries != NULL ? htsmsg_json_deserialize(entries) : NULL;
- htsmsg_autodtor(out) = htsmsg_create_map();
+ htsmsg_t *out = htsmsg_create_map();
scopedgloballock();
extjs_channels_update(in);
} else {
+ htsmsg_destroy(in);
+ htsmsg_destroy(out);
return 400;
}
htsmsg_json_serialize(out, hq, 0);
http_output_content(hc, "text/x-json; charset=UTF-8");
+ htsmsg_destroy(in);
+ htsmsg_destroy(out);
return 0;
}