aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-02-12 01:53:22 +0100
committerJan200101 <sentrycraft123@gmail.com>2023-02-12 01:53:22 +0100
commit55b916972339f95b2cd7c13c178e43c12f71c147 (patch)
tree74c95ddaf57e1c2dcabc424b51358782b1406e83
parent55c37a7c21ec98fdbfcb8e8fc2b1bb7e6c1f99a7 (diff)
downloadOFQT-55b916972339f95b2cd7c13c178e43c12f71c147.tar.gz
OFQT-55b916972339f95b2cd7c13c178e43c12f71c147.zip
don't preallocate memory
-rw-r--r--src/net.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/net.c b/src/net.c
index ef661e2..7c76d4c 100644
--- a/src/net.c
+++ b/src/net.c
@@ -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();