Fixed possible memory leak.
This commit is contained in:
parent
97f7aa8f42
commit
61e7f993aa
@ -410,18 +410,9 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr)
|
|||||||
/* copy hotpluged device mount point to the dev_array */
|
/* copy hotpluged device mount point to the dev_array */
|
||||||
if (strstr(word, "/mnt/") != NULL || strstr(word, "/media/") != NULL)
|
if (strstr(word, "/mnt/") != NULL || strstr(word, "/media/") != NULL)
|
||||||
{
|
{
|
||||||
dev_array[size].path = _strdup(word);
|
dev_array[size].path = word;
|
||||||
if (!dev_array[size].path)
|
|
||||||
{
|
|
||||||
fclose(f);
|
|
||||||
free(line);
|
|
||||||
error = CHANNEL_RC_NO_MEMORY;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_array[size++].to_add = TRUE;
|
dev_array[size++].to_add = TRUE;
|
||||||
}
|
}
|
||||||
free(word);
|
|
||||||
}
|
}
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user