Skip to content
Snippets Groups Projects
Commit ea896da3 authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment