diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-09 19:34:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:49 -0500 |
commit | 7e297ecfa4db2c7ab720a63c7764bc0e20f8058c (patch) | |
tree | 6fdb0b5a3a713c5aab9669ef021456b2063919e6 /source4/auth/auth.c | |
parent | 43742e53c900733cf0eff085cb073d0c1c937530 (diff) | |
download | samba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.tar.gz samba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.tar.bz2 samba-7e297ecfa4db2c7ab720a63c7764bc0e20f8058c.zip |
r25047: Fix more warnings.
(This used to be commit 69de86d2d2e49439760fbc61901eb87fb7fc5d55)
Diffstat (limited to 'source4/auth/auth.c')
-rw-r--r-- | source4/auth/auth.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c index ba1e6fd0e5..1ad5332b28 100644 --- a/source4/auth/auth.c +++ b/source4/auth/auth.c @@ -455,13 +455,14 @@ NTSTATUS auth_register(const struct auth_operations *ops) return NT_STATUS_OBJECT_NAME_COLLISION; } - backends = realloc_p(backends, struct auth_backend, num_backends+1); - if (!backends) { - return NT_STATUS_NO_MEMORY; - } - - new_ops = smb_xmemdup(ops, sizeof(*ops)); - new_ops->name = smb_xstrdup(ops->name); + backends = talloc_realloc(talloc_autofree_context(), backends, + struct auth_backend, num_backends+1); + NT_STATUS_HAVE_NO_MEMORY(backends); + + new_ops = talloc_memdup(backends, ops, sizeof(*ops)); + NT_STATUS_HAVE_NO_MEMORY(new_ops); + new_ops->name = talloc_strdup(new_ops, ops->name); + NT_STATUS_HAVE_NO_MEMORY(new_ops->name); backends[num_backends].ops = new_ops; |