unicode: mkutf8data: Add malloc allocation check
PATCH 1/1 unicode: mkutf8data: Add malloc allocation check
If malloc allocation fails, NULL is returned.
Signed-off-by Li kunyu <[email protected]>
--- fs/unicode/mkutf8data.c | 3 +++ 1 file changed, 3 insertions(+)
fs/unicode/mkutf8data.c +3 -0
@@ -495,6 +495,9 @@ static struct node *alloc_node(struct node *parent)int bitnum; node =malloc (sizeof (*node)); +if (!node) +return NULL ; + node->left = node->right =NULL ; node->parent = parent; node->leftnode =NODE ;
Signature · 1 line
2.18.2