Changeset f48d06a6 in rtems


Ignore:
Timestamp:
Nov 15, 2012, 2:02:54 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
891d0d96
Parents:
767b4c1
git-author:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:02:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:33:10)
Message:

sptests/spfatal24: Fix NULL pointer access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spfatal24/testcase.h

    r767b4c1 rf48d06a6  
    99
    1010#include <rtems/gxx_wrappers.h>
     11#include <rtems/malloc.h>
    1112
    1213#define FATAL_ERROR_TEST_NAME            "GXX KEY ADD FAILURE"
     
    1819void force_error()
    1920{
    20   void *alloc_ptr = NULL;
    21   Heap_Information_block info;
    22   __gthread_key_t key = 0;
    23   bool ok = false;
     21  __gthread_key key;
    2422
    25   ok = rtems_workspace_get_information( &info );
    26   rtems_test_assert( ok );
     23  rtems_workspace_greedy_allocate( NULL, 0 );
    2724
    28   ok = rtems_workspace_allocate( info.Free.largest - 4, &alloc_ptr );
    29   rtems_test_assert( ok );
    30 
    31   rtems_gxx_getspecific( key );
     25  rtems_gxx_getspecific( &key );
    3226}
Note: See TracChangeset for help on using the changeset viewer.