--- trunk/lxpanel/src/plugins/batt/batt_sys.c 2009/06/16 22:09:10 1617 +++ trunk/lxpanel/src/plugins/batt/batt_sys.c 2009/08/19 07:40:45 1950 @@ -271,8 +271,10 @@ if ( b->type_battery == TRUE ) break; /* ignore non-batteries */ - else + else { g_free(b); + b = NULL; + } } g_dir_close( dir ); return b;