From db530a2969eea8393f64e2329015c4dcf7c9d1c6a4323448cc09246097cd68c6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 20 May 2019 12:45:58 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=319 --- source.dif | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source.dif b/source.dif index 2c03510..9fa5f44 100644 --- a/source.dif +++ b/source.dif @@ -1043,10 +1043,11 @@ #endif typedef struct _simplereg { +- size_t bucket_pos; + int heap_instance; - int bucket_pos; ++ int bucket_pos; size_t bucket_size; -- int heap_instance; +- size_t heap_instance; - aligned_data **align_data_set ; -} simplereg; + union { @@ -1084,7 +1085,7 @@ align_set->bucket_pos = 0; align_set->bucket_size = ALIGN_BUFF_BUCKET_SIZE; align_set->heap_instance = 1; -- memset(align_set->align_data_set, 0,size); +- memset(align_set->align_data_set, 0UL,size); + memset(align_set->align_data._area, 0, size); + p = align_set->bucket_size; + while (p-- > 0){ @@ -1132,19 +1133,18 @@ } static void align_free_set(void){ -@@ -174,16 +181,16 @@ +@@ -174,15 +181,16 @@ if (align_set->heap_instance>1) { align_set->heap_instance--; } else if (align_set->heap_instance ==1) { - if (align_set->align_data_set){ -- int p; +- size_t p; - for(p=1;pbucket_pos;p++){ -- aligned_data *ptr = align_set->align_data_set[p]; -- if (ptr) { -- free(ptr); +- if (align_set->align_data_set[p]) { +- free(align_set->align_data_set[p]); + if (align_set->align_data._area){ + int p = align_set->bucket_pos; -+ while (p-- > 0){ /* Do not leak allocated mem address on subscript 0 */ ++ while (p-- > 0){ + if (align_set->align_data._set[p]) { + free(align_set->align_data._set[p]); + align_set->align_data._set[p] = NULL; @@ -1157,7 +1157,7 @@ } align_set->heap_instance=0; free(align_set); -@@ -226,7 +233,6 @@ +@@ -225,7 +233,6 @@ #ifdef PPHEAP_NEED_ALIGNMENT align_free_set(); #endif @@ -1165,7 +1165,7 @@ } void ppheap_renew (ppheap *heap) -@@ -416,7 +422,7 @@ +@@ -415,7 +422,7 @@ // iof_close(O); #ifdef PPHEAP_NEED_ALIGNMENT /* Todo: only if data%sizeof(aligned_data) != 0 */