[Pkg-wmaker-commits] [wmbattery] 01/02: wmbattery: Free memory allocated by strdup.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Aug 30 21:29:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmbattery.

commit 1018678d1b52f4ac7ff4d25978e04e174ebd64ae
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Sun Aug 30 16:15:00 2015 -0400

    wmbattery: Free memory allocated by strdup.
    
    This corrects a mistake in [1] noticed by Andrew Shadura [2].
    
    [1] http://repo.or.cz/dockapps.git/commitdiff/29e5012
    [2] https://github.com/d-torrance/wmbattery/commit/9f7be30#commitcomment-12965145
---
 acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/acpi.c b/acpi.c
index dc2f3bc..1cf3a8e 100644
--- a/acpi.c
+++ b/acpi.c
@@ -226,6 +226,7 @@ int find_items(char *itemname, char infoarray[ACPI_MAXITEM][128],
 			acpi_labels[label_info]);
 		snprintf(statusarray[i], sizeof(statusarray[i]), SYSFS_PATH "/%s/%s", devices[i],
 			acpi_labels[label_status]);
+		free(devices[i]);
 	}
 
 	free(devices);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git



More information about the Pkg-wmaker-commits mailing list