diff options
author | Rafal Szczesniak <mimir@samba.org> | 2007-05-11 21:51:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:19 -0500 |
commit | 7e14a25dc66082f48143368fef305067d4c0dfab (patch) | |
tree | 1b75d23c1d4a18afdc6e58f382683442eb03b249 /source4 | |
parent | a4e4ff927353e63b0dffb0d45dbd394b1938cadb (diff) | |
download | samba-7e14a25dc66082f48143368fef305067d4c0dfab.tar.gz samba-7e14a25dc66082f48143368fef305067d4c0dfab.tar.bz2 samba-7e14a25dc66082f48143368fef305067d4c0dfab.zip |
r22811: two more memory allocation checks.
rafal
(This used to be commit d66b13f6facdba407604f33211574f43163b186c)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_lookup.c | 2 | ||||
-rw-r--r-- | source4/libnet/userinfo.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index 1c60bfc41d..c8dc726764 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -74,6 +74,8 @@ struct composite_context *libnet_Lookup_send(struct libnet_context *ctx, /* parameters */ s->hostname.name = talloc_strdup(s, io->in.hostname); + if (composite_nomem(s->hostname.name, c)) return c; + s->hostname.type = io->in.type; s->hostname.scope = NULL; diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c index 03dc0d8fad..057e13d3b1 100644 --- a/source4/libnet/userinfo.c +++ b/source4/libnet/userinfo.c @@ -296,9 +296,10 @@ struct composite_context *libnet_rpc_userinfo_send(struct dcerpc_pipe *p, s->lookup.in.domain_handle = &s->domain_handle; s->lookup.in.num_names = 1; s->lookup.in.names = talloc_array(s, struct lsa_String, 1); - if (composite_nomem(s->lookup.in.names, c)) return c; + s->lookup.in.names[0].string = talloc_strdup(s, io->in.username); + if (composite_nomem(s->lookup.in.names[0].string, c)) return c; /* send request */ lookup_req = dcerpc_samr_LookupNames_send(p, c, &s->lookup); |