summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-09-03 13:33:52 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-09-03 13:33:52 +0000
commit6bcb8c0cf5eb1842cc7d04ca34497869547ebefe (patch)
tree21e2035881a96922768648f85453e4d8e7530010 /common
parentdef15d8f6ec3776ba0b72ce8e05cb16b1d6f9595 (diff)
hal common: removed small memory leak
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;
}