From 4a295dbfe44ca2d938d76c7bc5af1b67d1146b31 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 16 Jul 2016 13:51:53 -0400 Subject: [PATCH] Corrected use of strdup instead of strsave, which causes a different malloc() to be called and can cause crashes. --- base/netcmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/netcmp.c b/base/netcmp.c index 2f77115..203cbe4 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -3434,7 +3434,7 @@ void PropertyOptimize(struct objlist *ob, struct nlist *tp) // Add "M" record behind it vl = &newvlist[--p]; - vl->key = strdup("M"); + vl->key = strsave("M"); vl->type = PROP_INTEGER; vl->value.ival = 1; vlist[0][i] = vl;