diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-23 17:32:46 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-03-23 18:28:23 +0100 |
commit | 43554ded6de6cc8e70b6146f245e6a421823f203 (patch) | |
tree | 2efa28df805c2d5d4df6c5a181d93173fff3e1fc | |
parent | bc7a0a9198a6bc26e1ddc7e5f1e52c97a07029a0 (diff) | |
download | samba-43554ded6de6cc8e70b6146f245e6a421823f203.tar.gz samba-43554ded6de6cc8e70b6146f245e6a421823f203.tar.bz2 samba-43554ded6de6cc8e70b6146f245e6a421823f203.zip |
Fix Coverity ID 462
(This used to be commit 9cf1e16a9c3cade9cd905f719de07578b3a91b1e)
-rw-r--r-- | source3/rpc_parse/parse_buffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c index bb39a58c07..63a73c4b7c 100644 --- a/source3/rpc_parse/parse_buffer.c +++ b/source3/rpc_parse/parse_buffer.c @@ -374,8 +374,10 @@ bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 return False; do { - if (!smb_io_unistr(desc, &chaine, ps, depth)) + if (!smb_io_unistr(desc, &chaine, ps, depth)) { + SAFE_FREE(chaine2); return False; + } l_chaine=str_len_uni(&chaine); @@ -402,10 +404,10 @@ bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16 { chaine2[l_chaine2] = '\0'; *string=(uint16 *)TALLOC_MEMDUP(prs_get_mem_context(ps),chaine2,realloc_size); + SAFE_FREE(chaine2); if (!*string) { return False; } - SAFE_FREE(chaine2); } if(!prs_set_offset(ps, old_offset)) |