From 4222bc1b880d6535462e3b5ba5431809a3c5fddc Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 14 Mar 2013 03:09:14 +0100 Subject: global: make sure to check service before checking service->port to prevent crashes --- src/property_list_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/property_list_service.c') diff --git a/src/property_list_service.c b/src/property_list_service.c index 025a9bc..941f37e 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c @@ -68,7 +68,7 @@ static property_list_service_error_t service_to_property_list_service_error(serv */ property_list_service_error_t property_list_service_client_new(idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client) { - if (!device || (service->port == 0) || !client || *client) + if (!device || !service || service->port == 0 || !client || *client) return PROPERTY_LIST_SERVICE_E_INVALID_ARG; service_client_t parent = NULL; -- cgit v1.1-32-gdbae