1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

r16339: Fix Klocwork ID

277 278     (cmd_*)

485 487 488 (ldap.c)

Volker
This commit is contained in:
Volker Lendecke 2006-06-18 09:45:18 +00:00 committed by Gerald (Jerry) Carter
parent ded2952e00
commit 5b1eba76b3
3 changed files with 23 additions and 2 deletions

View File

@ -904,7 +904,13 @@ char *ads_get_dn_canonical(ADS_STRUCT *ads, void *msg)
**/
char *ads_parent_dn(const char *dn)
{
char *p = strchr(dn, ',');
char *p;
if (dn == NULL) {
return NULL;
}
p = strchr(dn, ',');
if (p == NULL) {
return NULL;

View File

@ -1680,7 +1680,12 @@ static NTSTATUS cmd_samr_lookup_names(struct rpc_pipe_client *cli,
/* Look up names */
num_names = argc - 2;
names = TALLOC_ARRAY(mem_ctx, const char *, num_names);
if ((names = TALLOC_ARRAY(mem_ctx, const char *, num_names)) == NULL) {
rpccli_samr_close(cli, mem_ctx, &domain_pol);
rpccli_samr_close(cli, mem_ctx, &connect_pol);
result = NT_STATUS_NO_MEMORY;
goto done;
}
for (i = 0; i < argc - 2; i++)
names[i] = argv[i + 2];
@ -1747,6 +1752,12 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli,
num_rids = argc - 2;
rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids);
if ((rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids)) == NULL) {
rpccli_samr_close(cli, mem_ctx, &domain_pol);
rpccli_samr_close(cli, mem_ctx, &connect_pol);
result = NT_STATUS_NO_MEMORY;
goto done;
}
for (i = 0; i < argc - 2; i++)
sscanf(argv[i + 2], "%i", &rids[i]);

View File

@ -2454,6 +2454,10 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
option.count = option.ctr.count = 2;
option.ctr.type = TALLOC_ARRAY(mem_ctx, SPOOL_NOTIFY_OPTION_TYPE, 2);
if (option.ctr.type == NULL) {
result = WERR_NOMEM;
goto done;
}
ZERO_STRUCT(option.ctr.type[0]);
option.ctr.type[0].type = PRINTER_NOTIFY_TYPE;