Index: trunk/Ohana/src/opihi/lib.data/queues.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/queues.c	(revision 9280)
+++ trunk/Ohana/src/opihi/lib.data/queues.c	(revision 9359)
@@ -141,4 +141,5 @@
 }
 
+// return a newly allocated string containing the requested key value
 char *ChooseSingleKey (char *line, int Key) {
 
@@ -146,7 +147,10 @@
   char *key, *p;
 
+  if (Key == -1) {
+    key = strcreate (line);
+    return (key);
+  }
+
   key = line;
-  if (Key == -1) return line;
-
   for (i = 0; (i < Key) && (key != NULL); i++) {
     p = nextword (key);
@@ -192,5 +196,4 @@
     first = FALSE;
   }
-
   return (output);
 }
@@ -337,5 +340,9 @@
       test = ChooseKey (queue[0].lines[i], Key);
       if (test == NULL) continue;
-      if (strcmp (value, test)) continue;
+      if (strcmp (value, test)) { 
+	free (test);
+	continue;
+      }
+      free (test);
       choice = i;
   }
