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
This commit is contained in:
Doug Torrance 2015-08-30 16:15:00 -04:00 committed by Carlos R. Mafra
parent 54b81ad2f6
commit 14526dd328

View file

@ -226,6 +226,7 @@ int find_items(char *itemname, char infoarray[ACPI_MAXITEM][128],
acpi_labels[label_info]); acpi_labels[label_info]);
snprintf(statusarray[i], sizeof(statusarray[i]), SYSFS_PATH "/%s/%s", devices[i], snprintf(statusarray[i], sizeof(statusarray[i]), SYSFS_PATH "/%s/%s", devices[i],
acpi_labels[label_status]); acpi_labels[label_status]);
free(devices[i]);
} }
free(devices); free(devices);