From 36e2539a10e6d96561359ec004f2a8f17bc9d736 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Thu, 14 Dec 2023 14:56:05 +0100
Subject: [PATCH] Zero-init vectors in hjv()

---
 src/include/clu_subs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/include/clu_subs.h b/src/include/clu_subs.h
index df1d1955..6a2aa7cc 100644
--- a/src/include/clu_subs.h
+++ b/src/include/clu_subs.h
@@ -1185,8 +1185,8 @@ void hjv(
 	const int rfj_size = (lit > lmt) ? lit : lmt;
 	const int rfn_size = c4->litpo;
 	double *rfj, *rfn;
-	rfj = new double[rfj_size];
-	rfn = new double[rfn_size];
+	rfj = new double[rfj_size]();
+	rfn = new double[rfn_size]();
 	jer = 0;
 	int ivhb = 0;
 	for (int nf40 = 1; nf40 <= nsphmo; nf40++) { // GPU portable?
-- 
GitLab