Consistently use delete[] for sum arrays (only hit in error case).
@ -313,7 +313,7 @@ jlong __jlongpointer mu // probs for multiplying
sum = 0;
} catch (const char *err) {
PH_SetErrorMessage("%s", err);
if (sum) delete sum;
if (sum) delete[] sum;
}
@ -326,7 +326,7 @@ jdouble time // time bound
@ -294,7 +294,7 @@ jdouble time // time bound
@ -335,11 +335,11 @@ jlong __jlongpointer mu // probs for multiplying
// catch exceptions: register error, free memory
} catch (std::bad_alloc e) {
PS_SetErrorMessage("Out of memory");
PS_SetErrorMessage("%s", err);
@ -351,7 +351,7 @@ jdouble time // time bound
@ -318,7 +318,7 @@ jdouble time // time bound