hal: Branch 'master'
Joe Marcus Clarke
marcus at kemper.freedesktop.org
Wed Aug 19 13:59:43 PDT 2009
hald/freebsd/probing/probe-volume.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 2da4c93432ac53bcf24f66a00e87a76d7a2e6852
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Wed Aug 19 16:59:12 2009 -0400
fix DBusError handling and a memory leak
Be sure to free hfp_error, and patch a nearby memory leak.
diff --git a/hald/freebsd/probing/probe-volume.c b/hald/freebsd/probing/probe-volume.c
index 40e6180..5965a64 100644
--- a/hald/freebsd/probing/probe-volume.c
+++ b/hald/freebsd/probing/probe-volume.c
@@ -568,7 +568,7 @@ main (int argc, char **argv)
if (ufs_disk_fillout(&ufsdisk, device_file) == 0)
{
char ufsid[64];
- char **ufs_devs;
+ char **ufs_devs = NULL;
int num_udis;
int i;
@@ -587,10 +587,16 @@ main (int argc, char **argv)
gboolean mounted;
mounted = libhal_device_get_property_bool(hfp_ctx, ufs_devs[i], "volume.is_mounted", &hfp_error);
+ dbus_error_free(&hfp_error);
if (mounted)
- libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", TRUE, &hfp_error);
+ {
+ libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", TRUE, &hfp_error);
+ dbus_error_free(&hfp_error);
+ }
}
}
+ if (ufs_devs)
+ libhal_free_string_array(ufs_devs);
ufs_disk_close(&ufsdisk);
}
}
More information about the hal-commit
mailing list