summaryrefslogtreecommitdiff
path: root/hald
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2009-12-25 11:23:01 -0500
committerJoe Marcus Clarke <marcus@FreeBSD.org>2009-12-25 11:23:01 -0500
commit44cf7dc7ec4e8d8eb92e816e94d6611256e1e0d6 (patch)
tree5742b07acdd7ec205184a72e7050f47cbe17fb0a /hald
parenta3ea9ecc75a414e35ae763a92a2c3fa05a7ca0b3 (diff)
Fix a use-after-free bug
Do not use a freed pointer in the Fuse support code.
Diffstat (limited to 'hald')
-rw-r--r--hald/freebsd/hf-volume.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hald/freebsd/hf-volume.c b/hald/freebsd/hf-volume.c
index 249d2bd1..07cf8050 100644
--- a/hald/freebsd/hf-volume.c
+++ b/hald/freebsd/hf-volume.c
@@ -86,9 +86,12 @@ hf_volume_resolve_fuse (const char *special)
{
if (strcmp(fields[0], special) == 0)
{
+ char *ret;
+
+ ret = g_strdup(fields[1]);
g_strfreev(fields);
g_strfreev(lines);
- return g_strdup(fields[1]);
+ return ret;
}
}
g_strfreev(fields);