# never call malloc with size 0 · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/32e0dfd4f0dab351a024e7680280343db5d7c43e)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 32e0dfd4f0dab351a024e7680280343db5d7c43e

Requested commit: 32e0dfd4f0dab351a024e7680280343db5d7c43e

Commit: 32e0dfd4f0dab351a024e7680280343db5d7c43e

Tree: 7e2adc8de09eeb4f8d8319979d2c343fbfe919ca

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
never call malloc with size 0

instead we return nullptr. this makes the behavior consistent
across all platforms.

closes #1044
closes #1045

```

## Parents

- [d21a1922eb5d76b9b0d0611eaeb42c91f83234ab](https://git.cafe/gitcafe/zig/commit/d21a1922eb5d76b9b0d0611eaeb42c91f83234ab?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/32e0dfd4f0dab351a024e7680280343db5d7c43e?format=markdown)
