[Bugfix][API-617][System]Fix handle leakage when inserting or removing usb
Change-Id: Ie18c83e4a691632ba70c6a88b46244cf5a8f891b
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index 9a8ee83..8e0bbb1 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -6535,6 +6535,11 @@
int argc = 0;
char *argv[MAX_ARGS];//argv[0]:at name,argv[1]:raw data,argv[2]:at type,argv[3]:paramter1,argv[4]:paramter2 ....
char eBuf[1024];
+ if(ttyGS3_fd > 0)
+ {
+ close(ttyGS3_fd);
+ RLOGE("reopen need close");
+ }
ttyGS3_fd = open("/dev/ttyGS3",O_RDWR);
if(ttyGS3_fd==-1)
{