Use calloc in swap_HALF_in_ZVALUE() to help with compiler paranoia

This commit is contained in:
Landon Curt Noll
2022-12-03 09:34:32 -08:00
parent 333f0c4332
commit 74b833977b

View File

@@ -575,7 +575,7 @@ swap_HALF_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all)
/*
* allocate the storage
*/
dest = malloc(sizeof(ZVALUE));
dest = calloc(1, sizeof(ZVALUE));
if (dest == NULL) {
math_error("swap_HALF_in_ZVALUE: Not enough memory");
not_reached();