Skip to content

Check Malloc/Calloc Calls for Null in Server.c #49

@yhu76

Description

@yhu76

When using malloc or calloc, we can check whether the returned pointer is NULL or not. If it is NULL, it means that the allocation failed, so we need to handle the error by cleaning up and exiting.

Screenshot 2023-05-24 at 14 21 23

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions