Fix the svace issue (184088) 72/119672/1 submit/tizen_3.0/20170320.014016
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 20 Mar 2017 01:34:47 +0000 (10:34 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 20 Mar 2017 01:34:47 +0000 (10:34 +0900)
Change-Id: I43008203c23fc5e29f5cad64ddf3dcf328b68afa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
tools/hcidump.c

index b460daa..c98d60b 100644 (file)
@@ -298,6 +298,7 @@ static int process_frames(int dev, int sock, int fd, unsigned long flags)
                        len = write_n(fd, buf, frm.data_len + hdr_size);
                        if (len  < 0) {
                                perror("Write error");
+                               close(fd);
                                return -1;
                        }
                        written += len;