Skip to content

Commit 8dc3140

Browse files
committed
fix(//core/conversion/converters/Weights): intialize buf to nullptr
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent dd7cfaf commit 8dc3140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/conversion/converters/Weights.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Weights::Weights(ConversionCtx* ctx, at::Tensor t) {
8181
// Store the data in the conversion context so it remains until building is
8282
// complete
8383

84-
void* buf;
84+
void* buf = nullptr;
8585

8686
if (dtype_optional.value() == nvinfer1::DataType::kFLOAT) {
8787
buf = malloc(t_cpu.numel() * sizeof(float));

0 commit comments

Comments
 (0)