Fixed possible memory leak in tuntap.c

This commit is contained in:
Nikolay Borodin 2024-03-25 15:48:51 +02:00
parent 6967b8f80b
commit 5abeeff54f

View file

@ -164,6 +164,7 @@ JFUNC(jint, openTun) {
do {
if (findTapDevice(deviceId, sizeof(deviceId), deviceName, sizeof(deviceName), skip)) {
printf("Could not find a TAP interface\n");
free(tapData);
return skip == 0 ? 1 : 2; // TODO
}
printf("deviceID: '%s'\n", deviceId);