mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
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:
parent
4ec65c28d7
commit
f0ae0511c2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user