1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

Mac client uses freed memory (#2234)

* Update main.mm
This commit is contained in:
FX Coudert 2021-11-27 22:59:46 +01:00 committed by GitHub
parent 742ae6fb00
commit d3c3058f16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,13 +24,5 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
if (argc > 1 && strncmp(argv[1], "-v", 2) == 0)
{
char* env;
int debug = atoi(&argv[1][2]);
asprintf(&env, "TR_DEBUG=%d", debug);
putenv(env);
free(env);
}
return NSApplicationMain(argc, (char const**)argv); return NSApplicationMain(argc, (char const**)argv);
} }