@@ -277,6 +277,30 @@ static WOLFSSHD_CONFIG* wolfSSHD_ConfigCopy(WOLFSSHD_CONFIG* conf)
277277 newConf -> heap );
278278 }
279279
280+ if (ret == WS_SUCCESS && conf -> hostCertFile ) {
281+ ret = CreateString (& newConf -> hostCertFile , conf -> hostCertFile ,
282+ (int )WSTRLEN (conf -> hostCertFile ),
283+ newConf -> heap );
284+ }
285+
286+ if (ret == WS_SUCCESS && conf -> pidFile ) {
287+ ret = CreateString (& newConf -> pidFile , conf -> pidFile ,
288+ (int )WSTRLEN (conf -> pidFile ),
289+ newConf -> heap );
290+ }
291+
292+ if (ret == WS_SUCCESS && conf -> userCAKeysFile ) {
293+ ret = CreateString (& newConf -> userCAKeysFile , conf -> userCAKeysFile ,
294+ (int )WSTRLEN (conf -> userCAKeysFile ),
295+ newConf -> heap );
296+ }
297+
298+ if (ret == WS_SUCCESS && conf -> forceCmd ) {
299+ ret = CreateString (& newConf -> forceCmd , conf -> forceCmd ,
300+ (int )WSTRLEN (conf -> forceCmd ),
301+ newConf -> heap );
302+ }
303+
280304 if (ret == WS_SUCCESS ) {
281305 newConf -> loginTimer = conf -> loginTimer ;
282306 newConf -> port = conf -> port ;
@@ -310,8 +334,10 @@ void wolfSSHD_ConfigFree(WOLFSSHD_CONFIG* conf)
310334 FreeString (& current -> listenAddress , heap );
311335 FreeString (& current -> authKeysFile , heap );
312336 FreeString (& current -> hostKeyFile , heap );
313- FreeString (& current -> hostCertFile , heap );
314- FreeString (& current -> pidFile , heap );
337+ FreeString (& current -> hostCertFile , heap );
338+ FreeString (& current -> pidFile , heap );
339+ FreeString (& current -> userCAKeysFile , heap );
340+ FreeString (& current -> forceCmd , heap );
315341
316342 WFREE (current , heap , DYNTYPE_SSHD );
317343 current = next ;
0 commit comments