diff options
author | Matt Strapp <strap012@umn.edu> | 2020-11-18 11:56:36 -0600 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-11-18 11:56:36 -0600 |
commit | af68e813ad9e413421ba2dcce14093f186130082 (patch) | |
tree | 47076bfc7ba1855806fc2baf458edf7b2fdc6098 | |
parent | i fixed it? (diff) | |
download | csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar.gz csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar.bz2 csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar.lz csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar.xz csci4061-af68e813ad9e413421ba2dcce14093f186130082.tar.zst csci4061-af68e813ad9e413421ba2dcce14093f186130082.zip |
aaaaaaaaaaaaaaaaaaaaaaaaa
Diffstat (limited to '')
-rw-r--r-- | P3/server.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/P3/server.c b/P3/server.c index 899c23e..a8667d2 100644 --- a/P3/server.c +++ b/P3/server.c @@ -370,10 +370,8 @@ void *worker(void *arg) } else { - char *value = (char *)malloc(numbytes * sizeof(char)); - strcpy(value, workerBuf) //Not in cache, disk read succeeds - addIntoCache(request->request, value, (int)numbytes); + addIntoCache(request->request, workerBuf, (int)numbytes); } } } @@ -386,7 +384,6 @@ void *worker(void *arg) fclose(log); pthread_mutex_unlock(&logLock); free(bytesError); - free(workerBuf); // Return the result if (fail) |