diff --git a/src/bin/eeze/eeze_sensor_test.c b/src/bin/eeze/eeze_sensor_test.c index 0a1fc949ed..67dca6c236 100644 --- a/src/bin/eeze/eeze_sensor_test.c +++ b/src/bin/eeze/eeze_sensor_test.c @@ -136,6 +136,7 @@ main(void) if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n"); if (!eeze_sensor_timestamp_get(sens, ×tamp)) printf("fail get timestamp\n"); printf("Light output: accuracy %i, lux %f at time: %lli\n", acc, x, timestamp); + eeze_sensor_free(sens); } else printf("Could not find a light sensor!\n"); @@ -144,6 +145,7 @@ main(void) * can force a read out of the physical sensor instead of using the cached * values. Depending on the hardware this can take a long time. If you don't have special * requirements the cached values should be used. */ + sens = eeze_sensor_new(EEZE_SENSOR_TYPE_LIGHT); eeze_sensor_read(sens); if (!sens) printf("can't find an light sensor!\n"); if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n");