summaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 3f574b1832..7fdfacfddf 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -60,8 +60,7 @@ static void device_unset_sysfs(Device *d) {
else
hashmap_remove(devices, d->sysfs);
- free(d->sysfs);
- d->sysfs = NULL;
+ d->sysfs = mfree(d->sysfs);
}
static int device_set_sysfs(Device *d, const char *sysfs) {