From 43554ded6de6cc8e70b6146f245e6a421823f203 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 23 Mar 2008 17:32:46 +0100 Subject: Fix Coverity ID 462 (This used to be commit 9cf1e16a9c3cade9cd905f719de07578b3a91b1e) --- source3/rpc_parse/parse_buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/rpc_parse') 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)) -- cgit