]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_interrupts.c
code cleanup by replacing all memory allocation functions with ones that handle excep...
[netdata.git] / src / proc_interrupts.c
index b4a62f0429740bfe01b65649abd0cefeaed264c5..6f703434878eb7201a1d72889e2038401127ba63 100644 (file)
@@ -23,10 +23,7 @@ static inline struct interrupt *get_interrupts_array(int lines, int cpus) {
 
        if(lines < allocated) return irrs;
        else {
-               irrs = (struct interrupt *)realloc(irrs, lines * recordsize(cpus));
-               if(!irrs)
-                       fatal("Cannot allocate memory for %d interrupts", lines);
-
+               irrs = (struct interrupt *)reallocz(irrs, lines * recordsize(cpus));
                allocated = lines;
        }