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.
This commit is contained in:
parent
891c23ff6e
commit
5d1923b424
@ -931,7 +931,7 @@ restore(char *result, float val, int n)
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
/* get the exponent */
|
/* get the exponent */
|
||||||
mant = (char *) strtok(strdup(result), "e");
|
mant = (char *) strtok(pstrdup(result), "e");
|
||||||
exp = atoi(strtok(NULL, "e"));
|
exp = atoi(strtok(NULL, "e"));
|
||||||
|
|
||||||
if (exp == 0)
|
if (exp == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user