Changeset 82eb2c4 in rtems


Ignore:
Timestamp:
Nov 22, 2012, 1:08:38 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
e5a2249a
Parents:
f5d0285
git-author:
Sebastian Huber <sebastian.huber@…> (11/22/12 13:08:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/12 15:35:06)
Message:

ftpfs: Fix NULL pointer access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/lib/ftpfs.c

    rf5d0285 r82eb2c4  
    11491149{
    11501150  rtems_ftpfs_entry *e = loc->node_access;
    1151   const rtems_ftpfs_mount_entry *me = loc->mt_entry->fs_info;
    1152 
    1153   /* Close control connection if necessary */
    1154   if (e->ctrl_socket >= 0) {
    1155     rtems_ftpfs_send_command(e, "QUIT", NULL, me->verbose);
    1156 
    1157     close(e->ctrl_socket);
    1158   }
    1159 
    1160   free(e);
     1151
     1152  /* The root node handler has no entry */
     1153  if (e != NULL) {
     1154    const rtems_ftpfs_mount_entry *me = loc->mt_entry->fs_info;
     1155
     1156    /* Close control connection if necessary */
     1157    if (e->ctrl_socket >= 0) {
     1158      rtems_ftpfs_send_command(e, "QUIT", NULL, me->verbose);
     1159
     1160      close(e->ctrl_socket);
     1161    }
     1162
     1163    free(e);
     1164  }
    11611165}
    11621166
Note: See TracChangeset for help on using the changeset viewer.