mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
r22811: two more memory allocation checks.
rafal
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
44eacd8654
commit
d66b13f6fa
@@ -74,6 +74,8 @@ struct composite_context *libnet_Lookup_send(struct libnet_context *ctx,
|
|||||||
|
|
||||||
/* parameters */
|
/* parameters */
|
||||||
s->hostname.name = talloc_strdup(s, io->in.hostname);
|
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.type = io->in.type;
|
||||||
s->hostname.scope = NULL;
|
s->hostname.scope = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -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.domain_handle = &s->domain_handle;
|
||||||
s->lookup.in.num_names = 1;
|
s->lookup.in.num_names = 1;
|
||||||
s->lookup.in.names = talloc_array(s, struct lsa_String, 1);
|
s->lookup.in.names = talloc_array(s, struct lsa_String, 1);
|
||||||
|
|
||||||
if (composite_nomem(s->lookup.in.names, c)) return c;
|
if (composite_nomem(s->lookup.in.names, c)) return c;
|
||||||
|
|
||||||
s->lookup.in.names[0].string = talloc_strdup(s, io->in.username);
|
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 */
|
/* send request */
|
||||||
lookup_req = dcerpc_samr_LookupNames_send(p, c, &s->lookup);
|
lookup_req = dcerpc_samr_LookupNames_send(p, c, &s->lookup);
|
||||||
|
|||||||
Reference in New Issue
Block a user