summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/hal.c6
-rw-r--r--config/udev.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/config/hal.c b/config/hal.c
index 0b848a0f7..297520aa6 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -392,10 +392,10 @@ unwind:
free(driver);
free(name);
free(config_info);
- while (!dev && (tmpo = options)) {
+ while ((tmpo = options)) {
options = tmpo->next;
- free(tmpo->key);
- free(tmpo->value);
+ free(tmpo->key); /* NULL if dev != NULL */
+ free(tmpo->value); /* NULL if dev != NULL */
free(tmpo);
}
diff --git a/config/udev.c b/config/udev.c
index ab27c98a5..678e47a39 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -197,10 +197,10 @@ device_added(struct udev_device *udev_device)
unwind:
free(config_info);
- while (!dev && (tmpo = options)) {
+ while ((tmpo = options)) {
options = tmpo->next;
- free(tmpo->key);
- free(tmpo->value);
+ free(tmpo->key); /* NULL if dev != NULL */
+ free(tmpo->value); /* NULL if dev != NULL */
free(tmpo);
}