dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From 9257a03a02a35f12e6d410dd16bf003c9bae742e Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 14:03:56 +0200
Subject: [PATCH] acpi: make sure we never free an uninitialized pointer

---
 src/shared/acpi-fpdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
index a7c83ed..af58c7c 100644
--- a/src/shared/acpi-fpdt.c
+++ b/src/shared/acpi-fpdt.c
@@ -81,7 +81,7 @@ struct acpi_fpdt_boot {
 };
 
 int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
-        _cleanup_free_ char *buf;
+        _cleanup_free_ char *buf = NULL;
         struct acpi_table_header *tbl;
         size_t l;
         struct acpi_fpdt_header *rec;