output: Factor common code for command name tracking out of all drivers.
[pspp] / src / output / message-item.c
index feb1d32c02eed54e13cb66eba6c869c429447f2b..a44784fe2eac99b7b8291290366682fdcc83367e 100644 (file)
@@ -34,6 +34,7 @@ message_item_create (const struct msg *msg)
   item = xmalloc (sizeof *msg);
   output_item_init (&item->output_item, &message_item_class);
   item->msg = msg_dup (msg);
+  item->command_name = NULL;
 
   return item;
 }
@@ -49,6 +50,7 @@ message_item_destroy (struct output_item *output_item)
 {
   struct message_item *item = to_message_item (output_item);
   msg_destroy (item->msg);
+  free (item->command_name);
   free (item);
 }