even though it doesnt matter. lets be nice and free things eh?

SVN revision: 61141
This commit is contained in:
Carsten Haitzler 2011-07-08 02:24:56 +00:00
parent 9882ed594f
commit cd87dcb959
1 changed files with 6 additions and 2 deletions

View File

@ -156,9 +156,13 @@ main(int argc,
snprintf(file, sizeof(file), "/sys/class/leds/lcd-backlight/brightness");
if (stat(file, &st) >= 0)
{
maxstr = read_file("/sys/devices/leds/lcd-backlight/max_brightness");
maxlevel = 255;
if (maxstr) maxlevel = atoi(maxstr);
maxstr = read_file("/sys/devices/leds/lcd-backlight/max_brightness");
if (maxstr)
{
maxlevel = atoi(maxstr);
free(maxstr);
}
}
}
if (maxlevel > 0)