forked from Imagelibrary/rtems
ftpfs: Fix NULL pointer access
This commit is contained in:
@@ -1148,16 +1148,20 @@ static void rtems_ftpfs_eval_path(
|
|||||||
static void rtems_ftpfs_free_node(const rtems_filesystem_location_info_t *loc)
|
static void rtems_ftpfs_free_node(const rtems_filesystem_location_info_t *loc)
|
||||||
{
|
{
|
||||||
rtems_ftpfs_entry *e = loc->node_access;
|
rtems_ftpfs_entry *e = loc->node_access;
|
||||||
const rtems_ftpfs_mount_entry *me = loc->mt_entry->fs_info;
|
|
||||||
|
|
||||||
/* Close control connection if necessary */
|
/* The root node handler has no entry */
|
||||||
if (e->ctrl_socket >= 0) {
|
if (e != NULL) {
|
||||||
rtems_ftpfs_send_command(e, "QUIT", NULL, me->verbose);
|
const rtems_ftpfs_mount_entry *me = loc->mt_entry->fs_info;
|
||||||
|
|
||||||
close(e->ctrl_socket);
|
/* Close control connection if necessary */
|
||||||
|
if (e->ctrl_socket >= 0) {
|
||||||
|
rtems_ftpfs_send_command(e, "QUIT", NULL, me->verbose);
|
||||||
|
|
||||||
|
close(e->ctrl_socket);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static rtems_filesystem_node_types_t rtems_ftpfs_node_type(
|
static rtems_filesystem_node_types_t rtems_ftpfs_node_type(
|
||||||
|
|||||||
Reference in New Issue
Block a user