Fixed NULL pointer bug.
authorSven Trenkel <collectd@semidefinite.de>
Mon, 28 Sep 2009 23:02:48 +0000 (01:02 +0200)
committerSven Trenkel <collectd@semidefinite.de>
Mon, 28 Sep 2009 23:02:48 +0000 (01:02 +0200)
src/netapp.c

index 55f449b..0eb475a 100644 (file)
@@ -243,6 +243,9 @@ static void free_volume (volume_t *volume) /* {{{ */
 {
        volume_t *next;
 
+       if (volume == NULL)
+               return;
+
        next = volume->next;
 
        sfree (volume->name);
@@ -255,6 +258,9 @@ static void free_disk (disk_t *disk) /* {{{ */
 {
        disk_t *next;
 
+       if (disk == NULL)
+               return;
+
        next = disk->next;
 
        sfree (disk->name);