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.
This commit is contained in:
iphydf 2020-04-04 16:51:43 +00:00
parent 4ec65c28d7
commit f0ae0511c2
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -1,5 +1,5 @@
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include "../toxcore/tox.h"
@ -41,6 +41,7 @@ int main(int argc, char **argv)
Tox_Err_New error_new;
Tox *tox = tox_new(tox_options, &error_new);
tox_options_free(tox_options);
if (!tox || error_new != TOX_ERR_NEW_OK) {
free(buffer);