remove resource leak 06/11006/2
authoryoonki.park <yoonki.park@samsung.com>
Wed, 16 Oct 2013 06:58:45 +0000 (15:58 +0900)
committeryoonki.park <yoonki.park@samsung.com>
Thu, 17 Oct 2013 02:18:40 +0000 (11:18 +0900)
Change-Id: I63610fd78399f58ddb7eac45d84c146f4fac7631
Signed-off-by: yoonki.park <yoonki.park@samsung.com>
src/sdb.c

index aa75a82..b726574 100644 (file)
--- a/src/sdb.c
+++ b/src/sdb.c
@@ -394,6 +394,7 @@ int get_emulator_forward_port() {
         port_buf[strlen(port_buf)-1]='\0';
         port = strtol(port_buf, NULL, 10);
     }
+    sdb_close(fd);
     return port;
 }
 
@@ -414,6 +415,7 @@ int get_emulator_name(char str[], int str_size) {
             return -1;
         }
     }
+    sdb_close(fd);
     return 0;
 }