diff options
Diffstat (limited to 'source4/param/share.c')
-rw-r--r-- | source4/param/share.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/param/share.c b/source4/param/share.c index e7c00f5b35..abc5e2ebeb 100644 --- a/source4/param/share.c +++ b/source4/param/share.c @@ -116,12 +116,7 @@ NTSTATUS share_register(const struct share_ops *ops) smb_panic("out of memory in share_register"); } - backends[i] = malloc(sizeof(struct share_ops)); - if (!backends[i]) { - smb_panic("out of memory in share_register"); - } - - backends[i] = smb_xmemdup(ops, sizeof(*ops)); + backends[i] = (struct share_ops *)smb_xmemdup(ops, sizeof(*ops)); backends[i]->name = smb_xstrdup(ops->name); backends[i + 1] = NULL; |