Code

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 55f449b781112210442565cd1a43ab8ed70a1a49..0eb475a785c622ca00604d1806fda6bd31575663 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);