git.samba.org
/
jerry
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9017547
)
r16433: Fix Coverity #300 (triggered by a Klockwork bugfix
author
Jeremy Allison
<jra@samba.org>
Wed, 21 Jun 2006 00:17:14 +0000
(
00:17
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:18:54 +0000
(11:18 -0500)
I think). If a alloc fails just return NT_STATUS_NO_MEMORY,
don't go to "done" label and deref pointers.
Jeremy.
source/rpc_server/srv_lsa_nt.c
patch
|
blob
|
history
diff --git
a/source/rpc_server/srv_lsa_nt.c
b/source/rpc_server/srv_lsa_nt.c
index ae9795952cf065fa88379e56e9a6d460eadd8093..efa7156eea6f20913dd08228b42d5f33499733bc 100644
(file)
--- a/
source/rpc_server/srv_lsa_nt.c
+++ b/
source/rpc_server/srv_lsa_nt.c
@@
-1135,7
+1135,7
@@
NTSTATUS _lsa_lookup_names2(pipes_struct *p, LSA_Q_LOOKUP_NAMES2 *q_u, LSA_R_LOO
if ((ref == NULL) || (rids == NULL) || (rids2 == NULL)) {
r_u->status = NT_STATUS_NO_MEMORY;
-
goto done
;
+
return NT_STATUS_NO_MEMORY
;
}
if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&handle)) {
@@
-1149,10
+1149,6
@@
NTSTATUS _lsa_lookup_names2(pipes_struct *p, LSA_Q_LOOKUP_NAMES2 *q_u, LSA_R_LOO
goto done;
}
- if (!ref || !rids || !rids2) {
- return NT_STATUS_NO_MEMORY;
- }
-
/* set up the LSA Lookup RIDs response */
become_root(); /* lookup_name can require root privs */
r_u->status = lookup_lsa_rids(p->mem_ctx, ref, rids, num_entries,