Corrected use of strdup instead of strsave, which causes a different
malloc() to be called and can cause crashes.
This commit is contained in:
parent
eb72af6d54
commit
4a295dbfe4
|
|
@ -3434,7 +3434,7 @@ void PropertyOptimize(struct objlist *ob, struct nlist *tp)
|
||||||
|
|
||||||
// Add "M" record behind it
|
// Add "M" record behind it
|
||||||
vl = &newvlist[--p];
|
vl = &newvlist[--p];
|
||||||
vl->key = strdup("M");
|
vl->key = strsave("M");
|
||||||
vl->type = PROP_INTEGER;
|
vl->type = PROP_INTEGER;
|
||||||
vl->value.ival = 1;
|
vl->value.ival = 1;
|
||||||
vlist[0][i] = vl;
|
vlist[0][i] = vl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue