summaryrefslogtreecommitdiffstats
path: root/dev/ideviceheartbeat.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev/ideviceheartbeat.c')
-rw-r--r--dev/ideviceheartbeat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dev/ideviceheartbeat.c b/dev/ideviceheartbeat.c
index 89fe742..d108766 100644
--- a/dev/ideviceheartbeat.c
+++ b/dev/ideviceheartbeat.c
@@ -102,9 +102,12 @@ int main(int argc, char *argv[])
/* start heartbeat service on device */
heartbeat_client_start_service(device, &heartbeat, "ideviceheartbeat");
-
if (heartbeat) {
printf("< heartbeat started, listening...\n");
+ } else {
+ printf("Failed to start heartbeat service\n");
+ idevice_free(device);
+ return -1;
}
/* main loop */