aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ptr.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 800a043..fbcbb8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-11 kalev
+
+ * cmd.c: Fix a small memory leak in ptrdup2.
+
2009-04-08 kalev
* Rename movie.c -> movie_play.c
diff --git a/ptr.c b/ptr.c
index 74e3c69..4c765b5 100644
--- a/ptr.c
+++ b/ptr.c
@@ -64,6 +64,7 @@ ptr ptrdup2 __P2 (ptr,src, int,newmax)
else if (!src)
p = ptrnew(newmax);
else if ((p = malloc(newmax + sizeofptr))) {
+ p->signature = PTR_SIG;
p->max = newmax;
if (newmax > ptrlen(src))
newmax = ptrlen(src);