aboutsummaryrefslogtreecommitdiff
path: root/daemon/OlyUtility.cpp
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2013-10-23 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:46:30 -0800
commitdf48c99f8da89ef9a91fac638b8e0528507bd088 (patch)
tree28fe6a9ff0438f349987df531cf5c779320b1a38 /daemon/OlyUtility.cpp
parentfebe35e3fa5d8ac027b914f14991c95846f49251 (diff)
gator: Version 5.165.16
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/OlyUtility.cpp')
-rw-r--r--daemon/OlyUtility.cpp5
1 files changed, 2 insertions, 3 deletions
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;
}