summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r--net/unix/garbage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 75bdf66b81df..f31917683288 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -127,6 +127,11 @@ int unix_prepare_fpl(struct scm_fp_list *fpl)
list_add(&vertex->entry, &fpl->vertices);
}
+ fpl->edges = kvmalloc_array(fpl->count_unix, sizeof(*fpl->edges),
+ GFP_KERNEL_ACCOUNT);
+ if (!fpl->edges)
+ goto err;
+
return 0;
err:
@@ -136,6 +141,7 @@ err:
void unix_destroy_fpl(struct scm_fp_list *fpl)
{
+ kvfree(fpl->edges);
unix_free_vertices(fpl);
}