diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-02-12 01:53:22 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-02-12 01:53:22 +0100 |
commit | 55b916972339f95b2cd7c13c178e43c12f71c147 (patch) | |
tree | 74c95ddaf57e1c2dcabc424b51358782b1406e83 | |
parent | 55c37a7c21ec98fdbfcb8e8fc2b1bb7e6c1f99a7 (diff) | |
download | OFQT-55b916972339f95b2cd7c13c178e43c12f71c147.tar.gz OFQT-55b916972339f95b2cd7c13c178e43c12f71c147.zip |
don't preallocate memory
-rw-r--r-- | src/net.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -48,13 +48,7 @@ struct MemoryStruct* downloadToRam(const char* url) if (chunk) { - chunk->memory = malloc(1); - if (!chunk->memory) - { - free(chunk); - return NULL; - } - chunk->memory[0] = 0; + chunk->memory = NULL; chunk->size = 0; curl_handle = curl_easy_init(); |