coverity 181579: check result of malloc as intended
This commit is contained in:
parent
8a4881a142
commit
3c360d5192
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ int lws_alloc_vfs_file(struct lws_context *context, const char *filename, uint8_
|
|||
len = lws_vfs_get_length(fops_fd);
|
||||
|
||||
*buf = malloc((size_t)len);
|
||||
if (!buf)
|
||||
if (!*buf)
|
||||
goto bail;
|
||||
|
||||
if (lws_vfs_file_read(fops_fd, amount, *buf, len))
|
||||
|
|
Loading…
Add table
Reference in a new issue