diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils_disk.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/utils_disk.c b/lib/utils_disk.c index e22d6680..3ce4d47d 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c | |||
@@ -77,19 +77,18 @@ np_add_parameter(struct parameter_list **list, const char *name) | |||
77 | struct parameter_list * | 77 | struct parameter_list * |
78 | np_del_parameter(struct parameter_list *item, struct parameter_list *prev) | 78 | np_del_parameter(struct parameter_list *item, struct parameter_list *prev) |
79 | { | 79 | { |
80 | struct parameter_list *next; | 80 | struct parameter_list *next; |
81 | if (item->name_next) | ||
82 | next = item->name_next; | ||
83 | else | ||
84 | next = NULL; | ||
85 | 81 | ||
86 | 82 | if (item->name_next) | |
87 | free(item); | 83 | next = item->name_next; |
88 | if (prev) | 84 | else |
89 | prev->name_next = next; | 85 | next = NULL; |
90 | 86 | ||
91 | return next; | 87 | free(item); |
88 | if (prev) | ||
89 | prev->name_next = next; | ||
92 | 90 | ||
91 | return next; | ||
93 | } | 92 | } |
94 | 93 | ||
95 | 94 | ||