summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpranomostro <pranomestro@gmail.com>2016-12-02 11:30:48 +0100
committerpranomostro <pranomestro@gmail.com>2016-12-02 11:30:48 +0100
commit713f9fc99f9fde976aa3f70d5db0202066c07f8a (patch)
treea6d85f339f7c5855ac5e7772279a921e8af64b89
parent6fc1ba2feb25044623c4adbef1c714b7a84f9cbf (diff)
Check data for being NULL instead of intermediate, we did that already.
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index 96e3031..6a1e8a7 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1028,7 +1028,7 @@ datasave(void)
if (encryptsavefile){
sz += TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
data = malloc(sz);
- if (!intermediate)
+ if (!data)
eprintf("malloc:");
tox_pass_encrypt(intermediate, sz - TOX_PASS_ENCRYPTION_EXTRA_LENGTH, passphrase, pplen, data, NULL);
} else {