From 4a8624e63bfac63b35971f632330987c7d56ea1d Mon Sep 17 00:00:00 2001 From: Sven Trenkel Date: Tue, 29 Sep 2009 01:02:48 +0200 Subject: [PATCH] Fixed NULL pointer bug. --- src/netapp.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.30.2