]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_softirqs.c
code cleanup by replacing all memory allocation functions with ones that handle excep...
[netdata.git] / src / proc_softirqs.c
index 020bc5e35a111715d12bae587d53a0e050de8147..d966ab790f9b4b96757672dd8be05cdce393eef3 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;
        }