Skip to content

Commit 7670dc5

Browse files
committed
Avoid valgrind warnings in cases where an error occurs
1 parent ffb148d commit 7670dc5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

datPut.c

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ datPut( const HDSLoc *locator, const char *type_str, int ndim, const hdsdim dims
130130
/* Validate input locator. */
131131
dat1ValidateLocator( "datPut", 1, locator, 0, status );
132132

133+
namestr[ 0 ] = 0;
133134
datName(locator, namestr, status);
134135

135136
/* we do not care because this must be a temporary component
@@ -145,6 +146,7 @@ datPut( const HDSLoc *locator, const char *type_str, int ndim, const hdsdim dims
145146
}
146147

147148
/* Ensure that we have a primitive type supplied */
149+
normtypestr[ 0 ] = 0;
148150
isprim = dau1CheckType( 1, type_str, &h5type, normtypestr,
149151
sizeof(normtypestr), status );
150152

0 commit comments

Comments
 (0)