mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fixed current and potential bugs caught by Coverity
Change-Id: I9f9d09dc797ffea062eeb49c881be1d5acb63d7b
This commit is contained in:
committed by
Peter Johnson
parent
b0fec4089b
commit
055ee09825
@@ -390,7 +390,10 @@ JNIEXPORT jstring JNICALL Java_edu_wpi_first_wpilibj_communication_FRCNetworkCom
|
||||
(JNIEnv * env, jclass, jbyte port)
|
||||
{
|
||||
NETCOMM_LOG(logDEBUG) << "Calling HALGetJoystickName";
|
||||
return env->NewStringUTF(HALGetJoystickName(port));
|
||||
char* joystickName = HALGetJoystickName(port);
|
||||
jstring str = env->NewStringUTF(joystickName);
|
||||
std::free(joystickName);
|
||||
return str;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user