diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2016-12-24 18:22:02 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2016-12-24 18:22:02 +0100 |
commit | b4314bce152c52ee49ccc9f9a318390ec686bf2a (patch) | |
tree | 26cb21898e4c2f34d3cc0e9796c0e0f6fccf17cd | |
parent | 117d0bb2d04df5a6cb0289f00afe61671376f0ec (diff) | |
download | 0xFFFF-b4314bce152c52ee49ccc9f9a318390ec686bf2a.tar.bz2 |
cal: Fix pointer check
-rw-r--r-- | src/cal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -284,7 +284,7 @@ int cal_read_block(struct cal * cal, const char * name, void ** ptr, unsigned lo return -1; *ptr = malloc(hdr->length); - if (!ptr) + if (!*ptr) return -1; memcpy(*ptr, offset, hdr->length); |