]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Remove autodestructor 200/head
authorKristofer Karlsson <kristofer.karlsson@gmail.com>
Mon, 31 Dec 2012 13:46:06 +0000 (14:46 +0100)
committerKristofer Karlsson <kristofer.karlsson@gmail.com>
Mon, 31 Dec 2012 20:41:05 +0000 (21:41 +0100)
src/htsmsg.c
src/htsmsg.h
src/webui/extjs.c

index 935c30b65a41cd8eb2c8b2a003d26afb38ddc625..90f4e4eb4fcbb72a0da85ea4c4df6264b347a18c 100644 (file)
@@ -703,13 +703,4 @@ htsmsg_get_cdata(htsmsg_t *m, const char *field)
 }
 
 
-/**
- *
- */
-void
-htsmsg_dtor(htsmsg_t **mp)
-{
-  if(*mp != NULL)
-    htsmsg_destroy(*mp);
-}
 
index 82fb7fda84af554c1181839b70ec4ec2617ea9a1..8343634f7471c0cb0fc612f2ac3e0ea9aff4c116 100644 (file)
@@ -320,6 +320,3 @@ htsmsg_t *htsmsg_get_map_by_field_if_name(htsmsg_field_t *f, const char *name);
 
 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)))
index 059417c0b2f63bcf6e87bd0bdd61aae5cc1bbfd8..39b0788482f69213b8257f482285c468d0c787e8 100644 (file)
@@ -470,10 +470,10 @@ extjs_channels(http_connection_t *hc, const char *remain, void *opaque)
   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();
 
@@ -496,11 +496,15 @@ extjs_channels(http_connection_t *hc, const char *remain, void *opaque)
     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;
 }