Commit ea896da3 authored by Heikki Linnakangas's avatar Heikki Linnakangas

Replace strdup() with pstrdup(), to avoid leaking memory.

It's been like this since the seg module was introduced, so backpatch to
8.2 which is the oldest supported version.
parent 1f359446
......@@ -892,7 +892,7 @@ restore(char *result, float val, int n)
*p = '\0';
/* get the exponent */
strtok(strdup(result), "e");
strtok(pstrdup(result), "e");
exp = atoi(strtok(NULL, "e"));
if (exp == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment