71ca0d
diff -urN icu.old/source/common/uloc_keytype.cpp icu/source/common/uloc_keytype.cpp
71ca0d
--- icu.old/source/common/uloc_keytype.cpp	2017-02-01 01:21:30.000000000 +0530
71ca0d
+++ icu/source/common/uloc_keytype.cpp	2018-09-23 18:48:04.414990551 +0530
71ca0d
@@ -383,6 +383,7 @@
71ca0d
         LocExtKeyData* keyData = (LocExtKeyData*)uprv_malloc(sizeof(LocExtKeyData));
71ca0d
         if (keyData == NULL) {
71ca0d
             sts = U_MEMORY_ALLOCATION_ERROR;
71ca0d
+	    uprv_free(typeDataMap);
71ca0d
             break;
71ca0d
         }
71ca0d
         keyData->bcpId = bcpKeyId;
71ca0d
diff -urN icu.old/source/common/uloc_tag.cpp icu/source/common/uloc_tag.cpp
71ca0d
--- icu.old/source/common/uloc_tag.cpp	2017-10-11 21:54:34.000000000 +0530
71ca0d
+++ icu/source/common/uloc_tag.cpp	2018-09-23 18:48:58.207182317 +0530
71ca0d
@@ -2145,6 +2145,7 @@
71ca0d
 
71ca0d
 error:
71ca0d
     ultag_close(t);
71ca0d
+    uprv_free(pExtension);
71ca0d
     return NULL;
71ca0d
 }
71ca0d
 
71ca0d
diff -urN icu.old/source/i18n/olsontz.cpp icu/source/i18n/olsontz.cpp
71ca0d
--- icu.old/source/i18n/olsontz.cpp	2017-02-01 01:21:27.000000000 +0530
71ca0d
+++ icu/source/i18n/olsontz.cpp	2018-09-23 18:52:02.140418739 +0530
71ca0d
@@ -787,6 +787,7 @@
71ca0d
                     if (historicRules[typeIdx] == NULL) {
71ca0d
                         status = U_MEMORY_ALLOCATION_ERROR;
71ca0d
                         deleteTransitionRules();
71ca0d
+			uprv_free(times);
71ca0d
                         return;
71ca0d
                     }
71ca0d
                 }
71ca0d
diff -urN icu.old/source/i18n/rbt_pars.cpp icu/source/i18n/rbt_pars.cpp
71ca0d
--- icu.old/source/i18n/rbt_pars.cpp	2017-02-01 01:21:27.000000000 +0530
71ca0d
+++ icu/source/i18n/rbt_pars.cpp	2018-09-23 18:52:51.362679180 +0530
71ca0d
@@ -557,6 +557,7 @@
71ca0d
                 // The next character MUST be a segment open
71ca0d
                 if (single == NULL ||
71ca0d
                     !ICU_Utility::parseChar(rule, iref, SEGMENT_OPEN)) {
71ca0d
+		     uprv_free(single);
71ca0d
                     return syntaxError(U_INVALID_FUNCTION, rule, start, status);
71ca0d
                 }
71ca0d
                 
71ca0d
diff -urN icu.old/source/i18n/tznames_impl.cpp icu/source/i18n/tznames_impl.cpp
71ca0d
--- icu.old/source/i18n/tznames_impl.cpp	2017-10-11 21:54:34.000000000 +0530
71ca0d
+++ icu/source/i18n/tznames_impl.cpp	2018-09-23 18:55:36.222152997 +0530
71ca0d
@@ -1762,6 +1762,7 @@
71ca0d
     UResourceBundle* rbTable = NULL;
71ca0d
     rbTable = ures_getByKey(rb, key, rbTable, &status);
71ca0d
     if (U_FAILURE(status)) {
71ca0d
+	uprv_free(rbTable);
71ca0d
         return NULL;
71ca0d
     }
71ca0d
 
71ca0d
@@ -1784,6 +1785,7 @@
71ca0d
         if (names != NULL) {
71ca0d
             uprv_free(names);
71ca0d
         }
71ca0d
+	uprv_free(rbTable);
71ca0d
         return NULL;
71ca0d
     }
71ca0d
 
71ca0d
diff -urN icu.old/source/i18n/usearch.cpp icu/source/i18n/usearch.cpp
71ca0d
--- icu.old/source/i18n/usearch.cpp	2017-02-01 01:21:27.000000000 +0530
71ca0d
+++ icu/source/i18n/usearch.cpp	2018-09-23 18:54:34.752103865 +0530
71ca0d
@@ -222,6 +222,7 @@
71ca0d
         int32_t *temp = (int32_t *)allocateMemory(
71ca0d
                                          sizeof(int32_t) * newlength, status);
71ca0d
         if (U_FAILURE(*status)) {
71ca0d
+            uprv_free(temp);
71ca0d
             return NULL;
71ca0d
         }
71ca0d
         uprv_memcpy(temp, destination, sizeof(int32_t) * (size_t)offset);
71ca0d
@@ -263,6 +264,7 @@
71ca0d
                                          sizeof(int64_t) * newlength, status);
71ca0d
 
71ca0d
         if (U_FAILURE(*status)) {
71ca0d
+		uprv_free(temp);
71ca0d
             return NULL;
71ca0d
         }
71ca0d
 
71ca0d
diff -urN icu.old/source/tools/ctestfw/ctest.c icu/source/tools/ctestfw/ctest.c
71ca0d
--- icu.old/source/tools/ctestfw/ctest.c	2017-02-01 01:21:30.000000000 +0530
71ca0d
+++ icu/source/tools/ctestfw/ctest.c	2018-09-23 18:19:43.612734248 +0530
71ca0d
@@ -803,6 +803,7 @@
71ca0d
     }
71ca0d
     va_start(ap, pattern);
71ca0d
     vlog_err(NULL, pattern, ap);
71ca0d
+    va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 UBool T_CTEST_EXPORT2
71ca0d
@@ -810,6 +811,7 @@
71ca0d
   va_list ap;
71ca0d
   va_start(ap, pattern);
71ca0d
   return vlog_knownIssue(ticket, pattern, ap);
71ca0d
+  va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 void T_CTEST_EXPORT2
71ca0d
@@ -843,6 +845,7 @@
71ca0d
         }
71ca0d
         vlog_err(NULL, pattern, ap); /* no need for prefix in default case */
71ca0d
     }
71ca0d
+    va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 void T_CTEST_EXPORT2
71ca0d
@@ -852,6 +855,7 @@
71ca0d
 
71ca0d
     va_start(ap, pattern);
71ca0d
     vlog_info(NULL, pattern, ap);
71ca0d
+    va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 void T_CTEST_EXPORT2
71ca0d
@@ -861,6 +865,7 @@
71ca0d
 
71ca0d
     va_start(ap, pattern);
71ca0d
     vlog_verbose(NULL, pattern, ap);
71ca0d
+    va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 
71ca0d
@@ -882,6 +887,7 @@
71ca0d
     } else {
71ca0d
         vlog_info("[DATA] ", pattern, ap); 
71ca0d
     }
71ca0d
+    va_end(ap);
71ca0d
 }
71ca0d
 
71ca0d
 
71ca0d
diff -urN icu.old/source/tools/gensprep/store.c icu/source/tools/gensprep/store.c
71ca0d
--- icu.old/source/tools/gensprep/store.c	2017-02-08 00:27:35.000000000 +0530
71ca0d
+++ icu/source/tools/gensprep/store.c	2018-09-23 17:42:52.262908882 +0530
71ca0d
@@ -634,7 +634,6 @@
71ca0d
 cleanUpData(void) {
71ca0d
     uprv_free(mappingData);
71ca0d
     utrie_close(sprepTrie);
71ca0d
-    uprv_free(sprepTrie);
71ca0d
 }
71ca0d
 
71ca0d
 #endif /* #if !UCONFIG_NO_IDNA */
71ca0d
diff -urN icu.old/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgdata.cpp
71ca0d
--- icu.old/source/tools/pkgdata/pkgdata.cpp	2017-03-23 04:56:34.000000000 +0530
71ca0d
+++ icu/source/tools/pkgdata/pkgdata.cpp	2018-09-23 17:40:19.730240502 +0530
71ca0d
@@ -1531,11 +1531,11 @@
71ca0d
             gencFilePath);
71ca0d
 
71ca0d
     result = runCommand(cmd);
71ca0d
-    uprv_free(cmd);
71ca0d
     if (result != 0) {
71ca0d
         fprintf(stderr, "Error creating with assembly code. Failed command: %s\n", cmd);
71ca0d
         return result;
71ca0d
     }
71ca0d
+    uprv_free(cmd);
71ca0d
 
71ca0d
     return pkg_generateLibraryFile(targetDir, mode, tempObjectFile);
71ca0d
 }
71ca0d
diff -urN icu.old/source/tools/toolutil/filetools.cpp icu/source/tools/toolutil/filetools.cpp
71ca0d
--- icu.old/source/tools/toolutil/filetools.cpp	2017-02-01 01:21:30.000000000 +0530
71ca0d
+++ icu/source/tools/toolutil/filetools.cpp	2018-09-23 16:09:47.949491516 +0530
71ca0d
@@ -64,6 +64,7 @@
71ca0d
                     newpath.append(dirEntry->d_name, -1, status);
71ca0d
                     if (U_FAILURE(status)) {
71ca0d
                         fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, u_errorName(status));
71ca0d
+			free(pDir);
71ca0d
                         return FALSE;
71ca0d
                     };
71ca0d