Formatting .c/.h files and fix memory leakage issues

Signed-off-by: John Chung <john.chung@arm.com>
Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68
diff --git a/generator/sections/gen-section-firmware.c b/generator/sections/gen-section-firmware.c
index 7ba93ee..9eb3f69 100644
--- a/generator/sections/gen-section-firmware.c
+++ b/generator/sections/gen-section-firmware.c
@@ -11,23 +11,24 @@
 
 //Generates a single pseudo-random firmware error section, saving the resulting address to the given
 //location. Returns the size of the newly created section.
-size_t generate_section_firmware(void** location)
+size_t generate_section_firmware(void **location)
 {
-    //Create random bytes.
-    int size = 32;
-    UINT8* bytes = generate_random_bytes(size);
-    
-    //Set reserved areas to zero.
-    for (int i=0; i<6; i++)
-        *(bytes + 2 + i) = 0; //Reserved bytes 2-7.
+	//Create random bytes.
+	int size = 32;
+	UINT8 *bytes = generate_random_bytes(size);
 
-    //Set expected values.
-    *(bytes + 1) = 2; //Revision, referenced version of spec is 2.
-    UINT64* record_id = (UINT64*)(bytes + 8);
-    *record_id = 0; //Record ID, should be forced to NULL.
-    *bytes = rand() % 3; //Record type.
+	//Set reserved areas to zero.
+	for (int i = 0; i < 6; i++) {
+		*(bytes + 2 + i) = 0; //Reserved bytes 2-7.
+	}
 
-    //Set return values, exit.
-    *location = bytes;
-    return size;
-}
\ No newline at end of file
+	//Set expected values.
+	*(bytes + 1) = 2;    //Revision, referenced version of spec is 2.
+	UINT64 *record_id = (UINT64 *)(bytes + 8);
+	*record_id = 0;	     //Record ID, should be forced to NULL.
+	*bytes = rand() % 3; //Record type.
+
+	//Set return values, exit.
+	*location = bytes;
+	return size;
+}