Skip to content

Commit c19c8aa

Browse files
committed
no need to check for null ptr on free
1 parent 0b65154 commit c19c8aa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

jni-c-toxcore/jni-c-toxcore.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,10 +832,7 @@ void update_savedata_file(const Tox *tox, const uint8_t *passphrase, size_t pass
832832
if (tox == NULL)
833833
{
834834
dbg(9, "update_savedata_file:ERROR:tox ptr is NULL");
835-
if(savedata)
836-
{
837-
free(savedata);
838-
}
835+
free(savedata);
839836
return;
840837
}
841838
tox_get_savedata(tox, (uint8_t *)savedata);

0 commit comments

Comments
 (0)