summaryrefslogtreecommitdiffstats
path: root/source4/param/share.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-09 19:34:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:49 -0500
commit7e297ecfa4db2c7ab720a63c7764bc0e20f8058c (patch)
tree6fdb0b5a3a713c5aab9669ef021456b2063919e6 /source4/param/share.c
parent43742e53c900733cf0eff085cb073d0c1c937530 (diff)
downloadsamba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.tar.gz
samba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.tar.xz
samba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.zip
r25047: Fix more warnings.
(This used to be commit 69de86d2d2e49439760fbc61901eb87fb7fc5d55)
Diffstat (limited to 'source4/param/share.c')
-rw-r--r--source4/param/share.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/param/share.c b/source4/param/share.c
index e7c00f5b350..abc5e2ebebb 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;