summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libirecovery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index c7afe7b..efcb7b4 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -2310,6 +2310,11 @@ static void* _irecv_handle_device_add(void *userdata)
2310 2310
2311 if (product_id == KIS_PRODUCT_ID) { 2311 if (product_id == KIS_PRODUCT_ID) {
2312 client = (irecv_client_t)malloc(sizeof(struct irecv_client_private)); 2312 client = (irecv_client_t)malloc(sizeof(struct irecv_client_private));
2313 if (client == NULL) {
2314 debug("%s: Failed to allocate memory\n", __func__);
2315 return NULL;
2316 }
2317 memset(client, '\0', sizeof(struct irecv_client_private));
2313 client->handle = CreateFileA(result, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); 2318 client->handle = CreateFileA(result, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
2314 if (client->handle == INVALID_HANDLE_VALUE) { 2319 if (client->handle == INVALID_HANDLE_VALUE) {
2315 debug("%s: Failed to open device path %s\n", __func__, result); 2320 debug("%s: Failed to open device path %s\n", __func__, result);