diff options
author | Christopher R. Hertel (crh) <crh@samba.org> | 2014-02-14 11:41:24 -0600 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-02-14 10:47:22 -0800 |
commit | 938bbff1243400401d534174301939fdd2c59cb9 (patch) | |
tree | 9c110a43c8cd7b0d1e772df181da6f5bd7cd30cf /source3 | |
parent | e0bf930f23fe20ee00d0006a5f6c2ba1a8f592a0 (diff) | |
download | samba-938bbff1243400401d534174301939fdd2c59cb9.tar.gz samba-938bbff1243400401d534174301939fdd2c59cb9.tar.xz samba-938bbff1243400401d534174301939fdd2c59cb9.zip |
regedit_valuelist.c: Coverity fix; Initialize a variable.
The <tmp> variable is tested at the end of the function to determine the
return value, but <tmp> is never initialized and there are conditions
under which it may be tested before a value is set.
This patch initializes <tmp> to NULL, which means that WERR_NOMEM will
be returned if the registry lookups fail.
CID: 1168007
Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/regedit_valuelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/regedit_valuelist.c b/source3/utils/regedit_valuelist.c index 4d21be5416..b135159ed9 100644 --- a/source3/utils/regedit_valuelist.c +++ b/source3/utils/regedit_valuelist.c @@ -169,7 +169,7 @@ static bool string_is_printable(const char *s) static WERROR append_data_summary(struct value_item *vitem) { - char *tmp; + char *tmp = NULL; /* This is adapted from print_registry_value() in net_registry_util.c */ |