diff options
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 5cb7e90cb6..25e35c84dd 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -51,8 +51,10 @@ bool CToxProto::InitToxCore() if (LoadToxProfile(options))
{
- if (toxThread == NULL)
+ if (toxThread == NULL) {
+ tox_options_free(options);
return false;
+ }
TOX_ERR_NEW initError;
toxThread->tox = tox_new(options, &initError);
|