Merge lp:~dobey/ubuntuone-client/fix-1043868 into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Roberto Alsina
Approved revision: 1303
Merged at revision: 1303
Proposed branch: lp:~dobey/ubuntuone-client/fix-1043868
Merge into: lp:ubuntuone-client
Diff against target: 12 lines (+1/-1)
1 file modified
libsyncdaemon/syncdaemon-shares-interface.c (+1/-1)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-1043868
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+122076@code.launchpad.net

Commit message

Allocate one extra slot for the strv to fit all the GSList entries.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libsyncdaemon/syncdaemon-shares-interface.c'
2--- libsyncdaemon/syncdaemon-shares-interface.c 2012-04-09 20:07:05 +0000
3+++ libsyncdaemon/syncdaemon-shares-interface.c 2012-08-30 14:36:31 +0000
4@@ -303,7 +303,7 @@
5 } else {
6 GSList *l;
7 gint i;
8- gchar **users_array = g_new0 (gchar *, g_slist_length (usernames));
9+ gchar **users_array = g_new0 (gchar *, g_slist_length (usernames) + 1);
10
11 for (l = usernames, i = 0; l != NULL; l = l->next, i++)
12 users_array[i] = g_strdup (l->data);

Subscribers

People subscribed via source and target branches