twrpTar: Fix uninitialized current_archive_type

* current_archive_type is not properly initialized
  leading to a potential random close(fd) in closeTar()

Change-Id: I1598ba4d524b723b8175ee847e2b1c5aeedbd938
This commit is contained in:
nkk71
2017-06-29 15:16:23 +03:00
committed by Dees Troy
parent cd00a8b361
commit d59d02e1a1
+1
View File
@@ -1102,6 +1102,7 @@ int twrpTar::createTar() {
}
} else {
// Not compressed or encrypted
current_archive_type = UNCOMPRESSED;
init_libtar_buffer(0, progress_pipe_fd);
if (part_settings->adbbackup) {
LOGINFO("Opening TW_ADB_BACKUP uncompressed stream\n");