X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdf.c;h=af54c92f9f7da4ce3c919deb11d93c12478e8d85;hb=4d370741101aeb037ae52f3529a4a0869e0dc08a;hp=83be176469556f53fa627cc682521ffb4db367ff;hpb=2761915bed8c6caea41018be3e675aa712cc0b0a;p=collectd.git diff --git a/src/df.c b/src/df.c index 83be1764..af54c92f 100644 --- a/src/df.c +++ b/src/df.c @@ -25,7 +25,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #include "utils_mount.h" #include "utils_ignorelist.h" @@ -230,7 +229,10 @@ static int df_read (void) } /* Duplicate found: leave non-NULL dup_ptr. */ - if (by_device && (strcmp (mnt_ptr->spec_device, dup_ptr->spec_device) == 0)) + if (by_device + && (mnt_ptr->spec_device != NULL) + && (dup_ptr->spec_device != NULL) + && (strcmp (mnt_ptr->spec_device, dup_ptr->spec_device) == 0)) break; else if (!by_device && (strcmp (mnt_ptr->dir, dup_ptr->dir) == 0)) break;