summaryrefslogtreecommitdiff
path: root/support.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
committersrs5694 <srs5694@users.sourceforge.net>2010-02-11 22:22:22 -0500
commitcb76c673eeb84344887715d36d44b799042be5a5 (patch)
treec727bc4a638968b1be3812b567c34bd4c4f76132 /support.cc
parent6699b01eda84d24bfaf80ad725304fef2b0e1b2a (diff)
downloadsgdisk-cb76c673eeb84344887715d36d44b799042be5a5.tar.gz
A few minor bug fixes; backup function now accepts dd output of MBR,
main header, and main partition table, as well as gdisk-generated backups.
Diffstat (limited to 'support.cc')
-rw-r--r--support.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/support.cc b/support.cc
index 56a2dd3..f179c2f 100644
--- a/support.cc
+++ b/support.cc
@@ -234,12 +234,12 @@ void ReverseBytes(void* theValue, int numBytes) {
char* tempValue = NULL;
int i;
- tempValue = (char*) malloc(numBytes);
+ tempValue = new char [numBytes];
if (tempValue != NULL) {
memcpy(tempValue, theValue, numBytes);
for (i = 0; i < numBytes; i++)
((char*) theValue)[i] = tempValue[numBytes - i - 1];
- free(tempValue);
+ delete[] tempValue;
} // if
} // ReverseBytes()