1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

realloc()ing a just freed pointer is a bad idea.

Detected by: phkmalloc :-)
This commit is contained in:
Joerg Wunsch 1996-09-01 16:37:00 +00:00
parent 18666fbe54
commit b19d0e49c4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3732

View File

@ -0,0 +1,10 @@
--- xcept/script.c.orig Sun Sep 1 18:24:46 1996
+++ xcept/script.c Sun Sep 1 18:32:08 1996
@@ -809,7 +809,6 @@
if(a->value == b->value)
return error("pc: %d - variables don't differ!\n",pc);
len = strlen(a->value) + strlen(b->value) + 1;
- free(a->value);
if(!(a->value = ralloc(a->value,len))) return errorp("realloc\n");
strcat(a->value,b->value);