summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/hal-libhal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/hal-libhal.c b/common/hal-libhal.c
index 3787e73d..479d635e 100644
--- a/common/hal-libhal.c
+++ b/common/hal-libhal.c
@@ -25,6 +25,7 @@
#include <config.h>
#endif
+#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
@@ -122,12 +123,15 @@ int hal_create_device(struct hal_device *device)
" </method>\n",
&err) == FALSE) {
error("Failed to claim to interface: ", err.message);
+ dbus_error_free(&err);
}
if (libhal_device_commit_to_gdl(hal_ctx, dev, udi, NULL) == FALSE) {
error("Failed to create HAL device");
}
+ free(dev);
+
return 0;
}