Fix static analyzer issue 11/122511/1 submit/tizen_3.0/20170403.015747
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 3 Apr 2017 01:34:46 +0000 (10:34 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 3 Apr 2017 01:34:46 +0000 (10:34 +0900)
Change-Id: I2b98a24932342e94f245094e85940a84cf8361d3
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/pkg_getsize.c

index 991480755899ae31e153082be8db3b01917c7e85..51c62707b5915f09f5142a7ed053b43dfd63f1cf 100644 (file)
@@ -440,6 +440,7 @@ static int __calculate_pkg_size_info(STORAGE_TYPE type,
                                *app_size += __stat_size(&st);
                                LOGD("app_size: %lld", *app_size);
                                close(subfd);
+                               subfd = -1;
                        }
                }
                if (ext_tep_path) {
@@ -464,6 +465,7 @@ static int __calculate_pkg_size_info(STORAGE_TYPE type,
                                *app_size += __stat_size(&st);
                                LOGD("app_size: %lld", *app_size);
                                close(subfd);
+                               subfd = -1;
                        }
                }
        } else {