oops. fd leak. forgot to closedir(). fix.
SVN revision: 7936
This commit is contained in:
parent
3ca49ec205
commit
5f17f8ee9d
|
@ -5534,6 +5534,7 @@ Epplet_find_instance(char *name)
|
|||
|
||||
/* Pick our instance number. 255 is the max to avoid infinite loops, which could be caused by
|
||||
* lack of insert permissions in the config directory. */
|
||||
#if 0
|
||||
for (i = 1; i < 256; i++)
|
||||
{
|
||||
Esnprintf(s, sizeof(s), "%s/.lock_%i", conf_dir, i);
|
||||
|
@ -5593,7 +5594,9 @@ Epplet_find_instance(char *name)
|
|||
* number, so exit the loop. */
|
||||
break;
|
||||
}
|
||||
|
||||
#else
|
||||
i = 1;
|
||||
#endif
|
||||
/* Anything this high is probably an error. */
|
||||
if (i >= 255)
|
||||
{
|
||||
|
|
|
@ -122,6 +122,7 @@ cb_timer_acpi(void *data)
|
|||
bat_level += level;
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
}
|
||||
|
||||
if (prev_bat_drain < 1) prev_bat_drain = 1;
|
||||
|
|
Loading…
Reference in New Issue