From d7f9a3578d770a9793834a2a1eff9daab09fc009 Mon Sep 17 00:00:00 2001 From: Dong Anyuan Date: Thu, 20 Jun 2019 12:35:33 +0900 Subject: [PATCH] Fix Coverity Scan CID 60371 (Handle variable fd going out of scope leaks the handle.) --- openair3/NAS/COMMON/UTIL/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair3/NAS/COMMON/UTIL/device.c b/openair3/NAS/COMMON/UTIL/device.c index f8f1b9727b..41085f0e24 100644 --- a/openair3/NAS/COMMON/UTIL/device.c +++ b/openair3/NAS/COMMON/UTIL/device.c @@ -125,6 +125,7 @@ void* device_open(int type, const char* devpath, const char* params) if (stty_set(fd, params) != RETURNok) { device_close(devid); devid = NULL; + close(fd); } } }