| Index: src/nonsfi/irt/irt_interfaces.c
|
| diff --git a/src/nonsfi/irt/irt_interfaces.c b/src/nonsfi/irt/irt_interfaces.c
|
| index f9ca549ca23e1023bff12ca24e541da84a99739c..7871c073411bd01db2002cf6af76c5bf17bb1e35 100644
|
| --- a/src/nonsfi/irt/irt_interfaces.c
|
| +++ b/src/nonsfi/irt/irt_interfaces.c
|
| @@ -474,7 +474,12 @@ static int irt_clock_getres(nacl_irt_clockid_t clk_id,
|
| struct timespec *time_nacl) {
|
| struct timespec time;
|
| int result = check_error(clock_getres(clk_id, &time));
|
| - convert_to_nacl_timespec(time_nacl, &time);
|
| + /*
|
| + * The timespec pointer is allowed to be NULL for clock_getres() though
|
| + * not for clock_gettime().
|
| + */
|
| + if (time_nacl != NULL)
|
| + convert_to_nacl_timespec(time_nacl, &time);
|
| return result;
|
| }
|
|
|
|
|