X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=metrics.c;h=09083e639ab966d6e80c36845c8da3c76f447059;hb=da0ee5e7efab316635f59d212028844f848fa6ce;hp=77d7321b7f7e393682d9ef76abb314eddd6da74e;hpb=7980e4108be1dff9b074aa91b97c8d787df41d83;p=fips diff --git a/metrics.c b/metrics.c index 77d7321..09083e6 100644 --- a/metrics.c +++ b/metrics.c @@ -29,6 +29,7 @@ #include "fips-dispatch-gl.h" #include "metrics.h" +#include "xmalloc.h" typedef struct counter { @@ -116,11 +117,7 @@ metrics_counter_start (void) { counter_t *counter; - counter = malloc (sizeof(counter_t)); - if (counter == NULL) { - fprintf (stderr, "Out of memory\n"); - exit (1); - } + counter = xmalloc (sizeof(counter_t)); glGenQueries (1, &counter->id);