]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix memory corruption
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 29 Nov 2010 18:58:26 +0000 (18:58 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 29 Nov 2010 18:58:26 +0000 (18:58 +0000)
src/htsp.c

index e9b13dc51587360e57eab7829da3b8af630eb813..99fb632777562187d5e1a5114ac86e0b33eb15a9 100644 (file)
@@ -322,11 +322,11 @@ htsp_build_channel(channel_t *ch, const char *method)
     uint16_t caid;
     htsmsg_add_str(svcmsg, "name", transport_nicename(t));
     htsmsg_add_str(svcmsg, "type", transport_servicetype_txt(t));
-    htsmsg_add_msg(services, NULL, svcmsg);
     if((caid = transport_get_encryption(t)) != 0) {
       htsmsg_add_u32(svcmsg, "caid", caid);
       htsmsg_add_str(svcmsg, "caname", psi_caid2name(caid));
     }
+    htsmsg_add_msg(services, NULL, svcmsg);
   }
 
   htsmsg_add_msg(out, "services", services);