tftpDriver: don't free directory node's path string

Update #2375.
This commit is contained in:
Michael Davidsaver
2015-07-26 09:28:07 -04:00
committed by Sebastian Huber
parent 05d84959f7
commit aecb508673

View File

@@ -512,8 +512,9 @@ static int rtems_tftp_eval_path(
size_t pathlen = pathnamelen;
size_t len = currentlen + pathlen;
current = realloc (current, len + 1);
current = malloc (len + 1);
if (current != NULL) {
memcpy (current, currentloc->node_access, currentlen);
memcpy (current + currentlen, path, pathlen);
current [len] = '\0';
if (!rtems_tftp_is_directory (current, len)) {