summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskvariableget.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/taskvariableget.c')
-rw-r--r--cpukit/rtems/src/taskvariableget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/rtems/src/taskvariableget.c b/cpukit/rtems/src/taskvariableget.c
index 140729351e..b9db9f5bd6 100644
--- a/cpukit/rtems/src/taskvariableget.c
+++ b/cpukit/rtems/src/taskvariableget.c
@@ -32,6 +32,12 @@ rtems_status_code rtems_task_variable_get(
Objects_Locations location;
rtems_task_variable_t *tvp;
+ if ( !ptr )
+ return RTEMS_INVALID_ADDRESS;
+
+ if ( !result )
+ return RTEMS_INVALID_ADDRESS;
+
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_REMOTE: