diff options
| -rw-r--r-- | plugins/check_disk.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 15ec06cd..050298d6 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
| @@ -878,34 +878,22 @@ void set_all_thresholds(struct parameter_list *path, char *warn_freespace_units, | |||
| 878 | char *crit_freespace_percent, char *warn_usedspace_units, char *crit_usedspace_units, char *warn_usedspace_percent, | 878 | char *crit_freespace_percent, char *warn_usedspace_units, char *crit_usedspace_units, char *warn_usedspace_percent, |
| 879 | char *crit_usedspace_percent, char *warn_usedinodes_percent, char *crit_usedinodes_percent, | 879 | char *crit_usedspace_percent, char *warn_usedinodes_percent, char *crit_usedinodes_percent, |
| 880 | char *warn_freeinodes_percent, char *crit_freeinodes_percent) { | 880 | char *warn_freeinodes_percent, char *crit_freeinodes_percent) { |
| 881 | if (path->freespace_units != NULL) { | 881 | free(path->freespace_units); |
| 882 | free(path->freespace_units); | ||
| 883 | } | ||
| 884 | set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units); | 882 | set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units); |
| 885 | 883 | ||
| 886 | if (path->freespace_percent != NULL) { | 884 | free(path->freespace_percent); |
| 887 | free(path->freespace_percent); | ||
| 888 | } | ||
| 889 | set_thresholds(&path->freespace_percent, warn_freespace_percent, crit_freespace_percent); | 885 | set_thresholds(&path->freespace_percent, warn_freespace_percent, crit_freespace_percent); |
| 890 | 886 | ||
| 891 | if (path->usedspace_units != NULL) { | 887 | free(path->usedspace_units); |
| 892 | free(path->usedspace_units); | ||
| 893 | } | ||
| 894 | set_thresholds(&path->usedspace_units, warn_usedspace_units, crit_usedspace_units); | 888 | set_thresholds(&path->usedspace_units, warn_usedspace_units, crit_usedspace_units); |
| 895 | 889 | ||
| 896 | if (path->usedspace_percent != NULL) { | 890 | free(path->usedspace_percent); |
| 897 | free(path->usedspace_percent); | ||
| 898 | } | ||
| 899 | set_thresholds(&path->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); | 891 | set_thresholds(&path->usedspace_percent, warn_usedspace_percent, crit_usedspace_percent); |
| 900 | 892 | ||
| 901 | if (path->usedinodes_percent != NULL) { | 893 | free(path->usedinodes_percent); |
| 902 | free(path->usedinodes_percent); | ||
| 903 | } | ||
| 904 | set_thresholds(&path->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); | 894 | set_thresholds(&path->usedinodes_percent, warn_usedinodes_percent, crit_usedinodes_percent); |
| 905 | 895 | ||
| 906 | if (path->freeinodes_percent != NULL) { | 896 | free(path->freeinodes_percent); |
| 907 | free(path->freeinodes_percent); | ||
| 908 | } | ||
| 909 | set_thresholds(&path->freeinodes_percent, warn_freeinodes_percent, crit_freeinodes_percent); | 897 | set_thresholds(&path->freeinodes_percent, warn_freeinodes_percent, crit_freeinodes_percent); |
| 910 | } | 898 | } |
| 911 | 899 | ||
