Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 10020)
+++ trunk/ippTools/src/pzgetexp.c	(revision 10029)
@@ -84,4 +84,6 @@
             lastFileSet = psMetadataLookupStr(&status, output->data[0], "exp_id");
         }
+
+        psFree(output);
     }
 
@@ -106,5 +108,5 @@
     if (!output) {
         psError(PS_ERR_UNKNOWN, true, "popen() failed");
-        goto FAIL;
+        return false;
     }
     psString cmdOutput = psSlurpFile(output);
@@ -116,5 +118,5 @@
         // XXX not nessicarily an error
         psError(PS_ERR_UNKNOWN, true, "no new fileSet/exp IDs");
-        goto FAIL;
+        return false;
     }
     if (!psArrayLength(newSummitExps)) {
@@ -132,5 +134,5 @@
             psError(PS_ERR_UNKNOWN, false, "database error");
             psFree(newSummitExps);
-            goto FAIL;
+            return false;
         }
     }
@@ -143,5 +145,5 @@
             psError(PS_ERR_UNKNOWN, false, "database error");
             psFree(newSummitExps);
-            goto FAIL;
+            return false;
         }
         // sanity check that we actually inserted something
@@ -149,5 +151,5 @@
             psError(PS_ERR_UNKNOWN, false, "database error -- we should have inserted at least one row");
             psFree(newSummitExps);
-            goto FAIL;
+            return false;
         }
     }
@@ -163,6 +165,5 @@
             "       incoming.exp_id,"
             "       incoming.camera,"
-            "       incoming.telescope,"
-            "       gentag(incoming.exp_id)"
+            "       incoming.telescope"
             "   FROM incoming"
             "   LEFT JOIN summitExp"
@@ -175,5 +176,5 @@
         if (!p_psDBRunQuery(config->dbh, query)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
-            goto FAIL;
+            return false;
         }
     }
@@ -196,16 +197,9 @@
         if (!p_psDBRunQuery(config->dbh, query)) {
             psError(PS_ERR_UNKNOWN, false, "database error");
-            goto FAIL;
-        }
-    }
-
-    psFree(config);
-
-    exit(EXIT_SUCCESS);
-
-FAIL:
-    psFree(config);
-
-    exit(EXIT_FAILURE);
+            return false;
+        }
+    }
+
+    return true;
 }
 
