The data from ecore_file_ls is free'd when destroying the list.

SVN revision: 17247
This commit is contained in:
sebastid 2005-10-06 19:31:13 +00:00 committed by sebastid
parent 35429f3b55
commit 7d5b20f5b2
1 changed files with 1 additions and 6 deletions

View File

@ -935,7 +935,6 @@ _battery_linux_acpi_check(Battery *ef)
bat_drain += rate;
bat_level += level;
}
free(name);
}
if (bats) ecore_list_destroy(bats);
@ -1161,10 +1160,7 @@ _battery_linux_powerbook_check(Battery *ef)
while ((name = ecore_list_next(bats)))
{
if (strncmp(name, "battery", 7))
{
free(name);
continue;
}
continue;
snprintf(buf, sizeof(buf), "/proc/pmu/%s", name);
f = fopen(buf, "r");
@ -1213,7 +1209,6 @@ _battery_linux_powerbook_check(Battery *ef)
seconds = MAX(time, seconds);
}
}
free(name);
}
ecore_list_destroy(bats);
}