From 61e7f993aa3a846edd228053acce8d398559226a Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 1 Sep 2015 12:34:40 +0200 Subject: [PATCH] Fixed possible memory leak. --- channels/rdpdr/client/rdpdr_main.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index e25b78e0b..24f228e12 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -410,18 +410,9 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr) /* copy hotpluged device mount point to the dev_array */ if (strstr(word, "/mnt/") != NULL || strstr(word, "/media/") != NULL) { - dev_array[size].path = _strdup(word); - if (!dev_array[size].path) - { - fclose(f); - free(line); - error = CHANNEL_RC_NO_MEMORY; - goto cleanup; - } - + dev_array[size].path = word; dev_array[size++].to_add = TRUE; } - free(word); } free(line); }