From: Sven Trenkel Date: Mon, 28 Sep 2009 23:02:48 +0000 (+0200) Subject: Fixed NULL pointer bug. X-Git-Tag: collectd-4.9.0~73^2~18 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4a8624e63bfac63b35971f632330987c7d56ea1d;p=collectd.git Fixed NULL pointer bug. --- diff --git a/src/netapp.c b/src/netapp.c index 55f449b7..0eb475a7 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -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);