diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | common/gmountspec.c | 6 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2008-01-18 Alexander Larsson <alexl@redhat.com> + + * common/gmountspec.c: + (g_mount_spec_new_from_data): + Ensure that mount_prefix is never NULL. It + should be "/" in that case. + 2008-01-18 Luca Ferretti <elle.uca@libero.it> * programs/Makefile.am: diff --git a/common/gmountspec.c b/common/gmountspec.c index 179e2a5a..64640d35 100644 --- a/common/gmountspec.c +++ b/common/gmountspec.c @@ -58,6 +58,7 @@ g_mount_spec_new (const char *type) return spec; } +/* Takes ownership of passed in data */ GMountSpec * g_mount_spec_new_from_data (GArray *items, char *mount_prefix) @@ -67,7 +68,10 @@ g_mount_spec_new_from_data (GArray *items, spec = g_new0 (GMountSpec, 1); spec->ref_count = 1; spec->items = items; - spec->mount_prefix = mount_prefix; + if (mount_prefix == NULL) + spec->mount_prefix = g_strdup ("/"); + else + spec->mount_prefix = mount_prefix; g_array_sort (spec->items, item_compare); |