1
0
Fork 0
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:
Andy Green 2017-07-19 14:17:39 +08:00
parent 8a4881a142
commit 3c360d5192

View file

@ -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))