fix prevent violation
authorwoojin <woojin2.jung@samsung.com>
Tue, 23 Apr 2013 19:19:27 +0000 (04:19 +0900)
committerwoojin <woojin2.jung@samsung.com>
Tue, 23 Apr 2013 19:19:27 +0000 (04:19 +0900)
Change-Id: Ib828bd989b8246fb56023c41863a1b353ed64602

probe_file/da_io_stdc.c

index 0d2533a..aa673b9 100644 (file)
@@ -107,7 +107,9 @@ int fclose(FILE* stream)
        bfiltering = false;
        PRE_PROBEBLOCK_BEGIN();
        GET_FD_FROM_FILEP(stream);
-       _fstatret = fstat(_fd, &_statbuf);
+       if(_fd != -1) {                                                                                                                                         
+               _fstatret = fstat(_fd, &_statbuf);
+       }                                                                                                                                                               
        PRE_PROBEBLOCK_END();
 
        ret = fclosep(stream);