summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-19 22:55:03 +0000
committerJeremy Allison <jra@samba.org>2006-06-19 22:55:03 +0000
commit048dd9bc6c84ed0c66e08a009210f6bc257859ef (patch)
treec06c7e10008b90e974f305c9a502ca9be35776bd /source/rpc_parse
parent1a67ad99a9902363cb152797cbd59227f6180a11 (diff)
downloadsamba-048dd9bc6c84ed0c66e08a009210f6bc257859ef.tar.gz
samba-048dd9bc6c84ed0c66e08a009210f6bc257859ef.tar.xz
samba-048dd9bc6c84ed0c66e08a009210f6bc257859ef.zip
r16371: Fix Klocwork #1048.
Jeremy.
Diffstat (limited to 'source/rpc_parse')
-rw-r--r--source/rpc_parse/parse_ntsvcs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/rpc_parse/parse_ntsvcs.c b/source/rpc_parse/parse_ntsvcs.c
index 24bf3a455bf..599257e8020 100644
--- a/source/rpc_parse/parse_ntsvcs.c
+++ b/source/rpc_parse/parse_ntsvcs.c
@@ -299,8 +299,12 @@ BOOL ntsvcs_io_q_get_hw_profile_info(const char *desc, NTSVCS_Q_GET_HW_PROFILE_I
q_u->buffer_size = 0x000000a8;
- if ( UNMARSHALLING(ps) )
+ if ( UNMARSHALLING(ps) ) {
q_u->buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, q_u->buffer_size );
+ if (!q_u->buffer) {
+ return False;
+ }
+ }
if ( !prs_uint8s(True, "buffer", ps, depth, q_u->buffer, q_u->buffer_size) )
return False;
@@ -329,8 +333,12 @@ BOOL ntsvcs_io_r_get_hw_profile_info(const char *desc, NTSVCS_R_GET_HW_PROFILE_I
if ( !prs_align(ps) )
return False;
- if ( UNMARSHALLING(ps) )
+ if ( UNMARSHALLING(ps) ) {
r_u->buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, r_u->buffer_size );
+ if (!r_u->buffer) {
+ return False;
+ }
+ }
if ( !prs_uint8s(True, "buffer", ps, depth, r_u->buffer, r_u->buffer_size) )
return False;