Skip to content

Commit d7c5932

Browse files
authored
Merge pull request #1751 from CEED/jeremy/compile-leak
minor - make tidy happy about leak
2 parents 65f6c59 + 18c38ae commit d7c5932

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

backends/cuda/ceed-cuda-compile.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,21 @@ int CeedCompile_Cuda(Ceed ceed, const char *source, CUmodule *module, const Ceed
163163
va_list args;
164164

165165
va_start(args, num_defines);
166-
CeedCallBackend(CeedCompileCore_Cuda(ceed, source, true, &is_compile_good, module, num_defines, args));
166+
const CeedInt ierr = CeedCompileCore_Cuda(ceed, source, true, &is_compile_good, module, num_defines, args);
167+
167168
va_end(args);
169+
CeedCallBackend(ierr);
168170
return CEED_ERROR_SUCCESS;
169171
}
170172

171173
int CeedTryCompile_Cuda(Ceed ceed, const char *source, bool *is_compile_good, CUmodule *module, const CeedInt num_defines, ...) {
172174
va_list args;
173175

174176
va_start(args, num_defines);
175-
CeedCallBackend(CeedCompileCore_Cuda(ceed, source, false, is_compile_good, module, num_defines, args));
177+
const CeedInt ierr = CeedCompileCore_Cuda(ceed, source, false, is_compile_good, module, num_defines, args);
178+
176179
va_end(args);
180+
CeedCallBackend(ierr);
177181
return CEED_ERROR_SUCCESS;
178182
}
179183

backends/hip/ceed-hip-compile.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,21 @@ int CeedCompile_Hip(Ceed ceed, const char *source, hipModule_t *module, const Ce
159159
va_list args;
160160

161161
va_start(args, num_defines);
162-
CeedCallBackend(CeedCompileCore_Hip(ceed, source, true, &is_compile_good, module, num_defines, args));
162+
const CeedInt ierr = CeedCompileCore_Hip(ceed, source, true, &is_compile_good, module, num_defines, args);
163+
163164
va_end(args);
165+
CeedCallBackend(ierr);
164166
return CEED_ERROR_SUCCESS;
165167
}
166168

167169
int CeedTryCompile_Hip(Ceed ceed, const char *source, bool *is_compile_good, hipModule_t *module, const CeedInt num_defines, ...) {
168170
va_list args;
169171

170172
va_start(args, num_defines);
171-
CeedCallBackend(CeedCompileCore_Hip(ceed, source, false, is_compile_good, module, num_defines, args));
173+
const CeedInt ierr = CeedCompileCore_Hip(ceed, source, false, is_compile_good, module, num_defines, args);
174+
172175
va_end(args);
176+
CeedCallBackend(ierr);
173177
return CEED_ERROR_SUCCESS;
174178
}
175179

0 commit comments

Comments
 (0)