diff options
Diffstat (limited to 'src/location-corelocation.m')
-rw-r--r-- | src/location-corelocation.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/location-corelocation.m b/src/location-corelocation.m index 17e0054..bf60507 100644 --- a/src/location-corelocation.m +++ b/src/location-corelocation.m @@ -173,8 +173,10 @@ pipe_close_callback( static int -location_corelocation_init(location_corelocation_state_t *state) +location_corelocation_init(location_corelocation_state_t **state) { + *state = malloc(sizeof(location_corelocation_state_t)); + if (*state == NULL) return -1; return 0; } @@ -223,6 +225,7 @@ location_corelocation_free(location_corelocation_state_t *state) } free(state->private); + free(state); } static void |