# HG changeset patch
# User John Calcote <john.calcote@gmail.com>
# Date 1491604127 21600
#      Fri Apr 07 16:28:47 2017 -0600
# Node ID a53aa0004700c5e65dc72052298503faf3ae3fa0
# Parent  7287c265e09be2abcfefefd4e496e04f2e5afcde
BUG#100: Fix xrealloc to properly free original pointer on resize.

diff -r 7287c265e09b -r a53aa0004700 common/slp_xmalloc.c
--- a/common/slp_xmalloc.c	Fri Apr 07 15:50:23 2017 -0600
+++ b/common/slp_xmalloc.c	Fri Apr 07 16:28:47 2017 -0600
@@ -206,7 +206,7 @@
          if (newptr == 0)
             return 0;
          memcpy(newptr, ptr, x->size);
-         _xfree(file, line, x);
+         _xfree(file, line, ptr);
       }
       return newptr;
    }
