In error conditions, charList could be freed before it is initialized.
Move the initialization up to before the error checks.
Change-Id: I678f40552590e238f494507f7410233cdbb949ac
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5167
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
extern struct tapeConfig globalTapeConfig;
extern struct udbHandleS udbHandle;
+ charList.charListT_val = 0;
+ charList.charListT_len = 0;
blockSize = BUTM_BLKSIZE;
writeBlock = (char *)malloc(BUTM_BLOCKSIZE);
if (!writeBlock)
writeBufPtr = &writeBuffer[0];
firstcall = 1;
sequence = 1;
- charList.charListT_val = 0;
- charList.charListT_len = 0;
while (1) { /*w */
/* When no data in buffer, read data from the budb_server */