Author: phk
Date: Thu Oct 16 20:56:09 2008
New Revision: 183961
URL: http://svn.freebsd.org/changeset/base/183961

Log:
  Free old arrays if we increase them.
  
  Pointed out by:       mlaier

Modified:
  head/usr.bin/ministat/ministat.c

Modified: head/usr.bin/ministat/ministat.c
==============================================================================
--- head/usr.bin/ministat/ministat.c    Thu Oct 16 20:39:02 2008        
(r183960)
+++ head/usr.bin/ministat/ministat.c    Thu Oct 16 20:56:09 2008        
(r183961)
@@ -160,6 +160,7 @@ AddPoint(struct dataset *ds, double a)
                ds->lpoints *= 4;
                ds->points = calloc(sizeof *ds->points, ds->lpoints);
                memcpy(ds->points, dp, sizeof *dp * ds->n);
+               free(dp);
        }
        ds->points[ds->n++] = a;
        ds->sy += a;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to