Merge pull request #1455 from rubenk/configure-ac-remove-dead-code
[collectd.git] / src / zfs_arc.c
index 2577bb0..41a89b1 100644 (file)
@@ -208,6 +208,11 @@ static int za_read (void)
                {
                        llentry_t *e;
                        llvalues = malloc(sizeof(long long int) * i);
+                       if (llvalues == NULL)
+                       {
+                               ERROR ("zfs_arc plugin: `malloc' failed.");
+                               return (-1);
+                       }
                        int j = 0;
 
                        pnl = file_contents;