Changeset: 92ff72de6f81 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92ff72de6f81
Modified Files:
        gdk/gdk_aggr.c
Branch: Jul2017
Log Message:

Allocate correct amount of memory.


diffs (12 lines):

diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -299,7 +299,7 @@ dofsum(const void *restrict values, oid 
                                  * for the final step below */
                                double *temp;
                                pergroup[grp].maxpartials += 
pergroup[grp].maxpartials;
-                               temp = GDKrealloc(pergroup[grp].partials, 
pergroup[grp].maxpartials);
+                               temp = GDKrealloc(pergroup[grp].partials, 
pergroup[grp].maxpartials * sizeof(double));
                                if (temp == NULL)
                                        goto bailout;
                                pergroup[grp].partials = temp;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to