diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-04-04 16:51:43 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-04-05 09:08:44 +0000 |
commit | f0ae0511c21b43d7531885a2be8fc0710e1732f0 (patch) | |
tree | e215c055c56b4887de3846806eaadd049b26ee33 /testing/afl_toxsave.c | |
parent | 4ec65c28d74f5a23ede4d8350acece89c92ac680 (diff) |
Make afl_toxsave.c a bit more portable; fix memleak.
malloc.h doesn't exist on most platforms, and certainly not in stdc. No
functions from malloc.h are actually used here, and stdlib.h is enough.
Diffstat (limited to 'testing/afl_toxsave.c')
-rw-r--r-- | testing/afl_toxsave.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/afl_toxsave.c b/testing/afl_toxsave.c index ddfa569f..9f93074b 100644 --- a/testing/afl_toxsave.c +++ b/testing/afl_toxsave.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include <malloc.h> | ||
2 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | ||
3 | 3 | ||
4 | #include "../toxcore/tox.h" | 4 | #include "../toxcore/tox.h" |
5 | 5 | ||
@@ -41,6 +41,7 @@ int main(int argc, char **argv) | |||
41 | 41 | ||
42 | Tox_Err_New error_new; | 42 | Tox_Err_New error_new; |
43 | Tox *tox = tox_new(tox_options, &error_new); | 43 | Tox *tox = tox_new(tox_options, &error_new); |
44 | tox_options_free(tox_options); | ||
44 | 45 | ||
45 | if (!tox || error_new != TOX_ERR_NEW_OK) { | 46 | if (!tox || error_new != TOX_ERR_NEW_OK) { |
46 | free(buffer); | 47 | free(buffer); |