From df48c99f8da89ef9a91fac638b8e0528507bd088 Mon Sep 17 00:00:00 2001 From: Drew Richardson Date: Wed, 23 Oct 2013 12:00:00 -0700 Subject: gator: Version 5.16 Signed-off-by: Drew Richardson --- daemon/OlyUtility.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'daemon/OlyUtility.cpp') diff --git a/daemon/OlyUtility.cpp b/daemon/OlyUtility.cpp index b29a1e9..0b22d6e 100644 --- a/daemon/OlyUtility.cpp +++ b/daemon/OlyUtility.cpp @@ -83,7 +83,7 @@ int OlyUtility::getApplicationFullPath(char* fullpath, int sizeOfPath) { } fullpath[length] = 0; - fullpath = getPathPart(fullpath); + getPathPart(fullpath); return 0; } @@ -171,7 +171,7 @@ int OlyUtility::appendToDisk(const char* path, const char* data) { */ #define TRANSFER_SIZE 1024 int OlyUtility::copyFile(const char* srcFile, const char* dstFile) { - char* buffer = (char*)malloc(TRANSFER_SIZE); + char buffer[TRANSFER_SIZE]; FILE * f_src = fopen(srcFile,"rb"); if (!f_src) { return 0; @@ -197,7 +197,6 @@ int OlyUtility::copyFile(const char* srcFile, const char* dstFile) { } fclose(f_src); fclose(f_dst); - free(buffer); return 1; } -- cgit v1.2.3