Changeset 4afa216 in rtems


Ignore:
Timestamp:
Nov 24, 2014, 8:12:54 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
630642e
Parents:
a0bf44e
git-author:
Joel Sherrill <joel.sherrill@…> (11/24/14 20:12:54)
git-committer:
Joel Sherrill <joel.sherrill@…> (11/25/14 18:57:08)
Message:

cpukit/libmisc/shell/main_edit.c: Fix use after free()

Coverity Id 1255353. Read from pointer after free().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/main_edit.c

    ra0bf44e r4afa216  
    21482148        case ctrl('p'): pipe_command(ed); break;
    21492149#endif
     2150#if defined(__rtems__)
     2151        /*
     2152         * Coverity spotted this as using ed after free() so changing
     2153         * the order of the statements.
     2154         */
     2155        case ctrl('w'): ed = ed->env->current; close_editor(ed); break;
     2156#else
    21502157        case ctrl('w'): close_editor(ed); ed = ed->env->current; break;
     2158#endif
    21512159      }
    21522160    }
Note: See TracChangeset for help on using the changeset viewer.