libsparse: Fix null pointer issue
Fix the issue that "out" pointer is dereferenced without checking. Change-Id: I76a57ad7309841218231346f4807ef2be8628737 Signed-off-by: Hong-Mei Li <a21834@motorola.com>
This commit is contained in:
parent
f5562cb66c
commit
83a6d36d42
|
@ -675,6 +675,9 @@ struct output_file *output_file_open_fd(int fd, unsigned int block_size, int64_t
|
|||
} else {
|
||||
out = output_file_new_normal();
|
||||
}
|
||||
if (!out) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
out->ops->open(out, fd);
|
||||
|
||||
|
|
Loading…
Reference in New Issue