WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@ReinierMaas
Copy link

Calling malloc from realloc with a size of 0 will return NULL.
Remove call to malloc in realloc.

Calling malloc from realloc with a size of 0 will return NULL. 
Remove call to malloc in realloc.
@mooaccel
Copy link

I think you are wrong, if we have a invoke "realloc(NULL, sizeof(int));",this should be equivalent to malloc(sizeof(int)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants