Changeset 72df613 in mainline


Ignore:
Timestamp:
2018-08-25T19:35:21Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Children:
3c45353
Parents:
cc36562b
Message:

Avoid division by zero

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/time.c

    rcc36562b r72df613  
    8484        if (!cpu_stats)
    8585                return (clock_t) -1;
     86        if (!cpu_stats->frequency_mhz) {
     87                free(cpu_stats);
     88                return (clock_t) -1;
     89        }
    8690
    8791        clock_t total_usecs = -1;
Note: See TracChangeset for help on using the changeset viewer.