From: David Zeuthen Date: Sat, 4 Jul 2009 19:41:47 +0000 (-0400) Subject: Fix segfault when starting a Linux MD array X-Git-Tag: upstream/2.1.2~826 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c84363cfc4009d55217715301469c1dbeb6c957;p=platform%2Fupstream%2Fudisks2.git Fix segfault when starting a Linux MD array --- diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c index 4594f31..caaa7a5 100644 --- a/src/devkit-disks-device.c +++ b/src/devkit-disks-device.c @@ -9084,7 +9084,7 @@ devkit_disks_daemon_linux_md_start (DevkitDisksDaemon *daemon, gchar **components_as_strv; guint n; - components_as_strv = g_new0 (gchar *, components->len); + components_as_strv = g_new0 (gchar *, components->len + 1); for (n = 0; n < components->len; n++) components_as_strv[n] = g_strdup (components->pdata[n]);