diff --git a/jni-c-toxcore/jni-c-toxcore.c b/jni-c-toxcore/jni-c-toxcore.c index 99cf3a4b..548498d4 100644 --- a/jni-c-toxcore/jni-c-toxcore.c +++ b/jni-c-toxcore/jni-c-toxcore.c @@ -832,10 +832,7 @@ void update_savedata_file(const Tox *tox, const uint8_t *passphrase, size_t pass if (tox == NULL) { dbg(9, "update_savedata_file:ERROR:tox ptr is NULL"); - if(savedata) - { - free(savedata); - } + free(savedata); return; } tox_get_savedata(tox, (uint8_t *)savedata);