features/compress: NULL pointer dereferencing clang fix
Added a Label "err" to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I7ec02a9cbbc482c2cf77f66e5692e86cd251cd53 Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
This commit is contained in:
parent
2066466dad
commit
3be7116d39
@ -118,8 +118,8 @@ cdc_writev(call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
|
||||
};
|
||||
size_t isize = 0;
|
||||
|
||||
GF_VALIDATE_OR_GOTO("cdc", this, default_out);
|
||||
GF_VALIDATE_OR_GOTO(this->name, frame, default_out);
|
||||
GF_VALIDATE_OR_GOTO("cdc", this, err);
|
||||
GF_VALIDATE_OR_GOTO(this->name, frame, err);
|
||||
|
||||
priv = this->private;
|
||||
|
||||
@ -167,6 +167,9 @@ default_out:
|
||||
FIRST_CHILD(this)->fops->writev, fd, vector, count, offset,
|
||||
flags, iobref, xdata);
|
||||
return 0;
|
||||
err:
|
||||
STACK_UNWIND_STRICT(writev, frame, -1, EINVAL, NULL, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
Loading…
x
Reference in New Issue
Block a user