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

Signed-off-by: John Chung <john.chung@arm.com>
Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68
diff --git a/sections/cper-section-pci-dev.h b/sections/cper-section-pci-dev.h
index e261d44..5326a8c 100644
--- a/sections/cper-section-pci-dev.h
+++ b/sections/cper-section-pci-dev.h
@@ -4,32 +4,36 @@
 #include <json.h>
 #include "../edk/Cper.h"
 
-#define PCI_DEV_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"errorStatusValid", "idInfoValid", "memoryNumberValid", \
-    "ioNumberValid", "registerDataPairsValid"}
+#define PCI_DEV_ERROR_VALID_BITFIELD_NAMES                                     \
+	(const char *[])                                                       \
+	{                                                                      \
+		"errorStatusValid", "idInfoValid", "memoryNumberValid",        \
+			"ioNumberValid", "registerDataPairsValid"              \
+	}
 
 ///
 /// PCI/PCI-X Device Error Section
 ///
 typedef struct {
-  UINT64 VendorId : 16;
-  UINT64 DeviceId : 16;
-  UINT64 ClassCode : 24;
-  UINT64 FunctionNumber : 8;
-  UINT64 DeviceNumber : 8;
-  UINT64 BusNumber : 8;
-  UINT64 SegmentNumber : 8;
-  UINT64 Reserved : 40;
+	UINT64 VendorId : 16;
+	UINT64 DeviceId : 16;
+	UINT64 ClassCode : 24;
+	UINT64 FunctionNumber : 8;
+	UINT64 DeviceNumber : 8;
+	UINT64 BusNumber : 8;
+	UINT64 SegmentNumber : 8;
+	UINT64 Reserved : 40;
 } EFI_PCI_PCIX_DEVICE_ID_INFO;
 
 typedef struct {
-  UINT64                      ValidFields;
-  EFI_GENERIC_ERROR_STATUS    ErrorStatus;
-  EFI_PCI_PCIX_DEVICE_ID_INFO IdInfo;
-  UINT32                      MemoryNumber;
-  UINT32                      IoNumber;
+	UINT64 ValidFields;
+	EFI_GENERIC_ERROR_STATUS ErrorStatus;
+	EFI_PCI_PCIX_DEVICE_ID_INFO IdInfo;
+	UINT32 MemoryNumber;
+	UINT32 IoNumber;
 } __attribute__((packed, aligned(1))) EFI_PCI_PCIX_DEVICE_ERROR_DATA;
 
-json_object* cper_section_pci_dev_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
-void ir_section_pci_dev_to_cper(json_object* section, FILE* out);
+json_object *cper_section_pci_dev_to_ir(void *section);
+void ir_section_pci_dev_to_cper(json_object *section, FILE *out);
 
-#endif
\ No newline at end of file
+#endif