chiark / gitweb /
Don't allocate per-queue tabtype. In fact the allocate version broken
[disorder] / disobedience / queue-menu.c
index 44ec081e911ba44014b9bca4228b2057a3226b0f..ac3479aa9fbda091a47c99974ced396cfe92fb7d 100644 (file)
@@ -258,10 +258,9 @@ struct tabtype *ql_tabtype(struct queuelike *ql) {
     0
   };
 
-  struct tabtype *t = xmalloc(sizeof *t);
-  *t = ql_tabtype;
-  t->extra = ql;
-  return t;
+  ql->tabtype = ql_tabtype;
+  ql->tabtype.extra = ql;
+  return &ql->tabtype;
 }
 
 /*