Introduce GlobalFrees() for the error handling in GlobalInits().
This is not much of a point, because the program exits
shortly thereafter.

So I think GlobalFrees() is mostly for documentation
purposes.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>

Index: oisf/src/suricata.c
===================================================================
--- oisf.orig/src/suricata.c
+++ oisf/src/suricata.c
@@ -327,6 +327,23 @@ uint8_t print_mem_flag = 1;
 #endif
 #endif
 
+static void GlobalFrees(void)
+{
+	int q;
+
+	for (q = 0; q < NUM_QUEUES; q++) {
+		if (trans_q[q] != NULL) {
+			SCFree(trans_q[q]);
+			trans_q[q] = NULL;
+		}
+
+		if (data_queues[q] != NULL) {
+			SCFree(data_queues[q]);
+			data_queues[q] = NULL;
+		}
+	}
+}
+
 static void GlobalInits(void)
 {
 	int q;
@@ -354,6 +371,7 @@ static void GlobalInits(void)
    }
 
     if (r != 0) {
+		GlobalFrees();
         SCLogInfo("Trans_Q Mutex not initialized correctly");
         exit(EXIT_FAILURE);
     }


