mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
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);
|
len = lws_vfs_get_length(fops_fd);
|
||||||
|
|
||||||
*buf = malloc((size_t)len);
|
*buf = malloc((size_t)len);
|
||||||
if (!buf)
|
if (!*buf)
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
if (lws_vfs_file_read(fops_fd, amount, *buf, len))
|
if (lws_vfs_file_read(fops_fd, amount, *buf, len))
|
||||||
|
|
Loading…
Add table
Reference in a new issue