mirror of
https://github.com/postgres/postgres.git
synced 2026-04-03 16:26:40 -04:00
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
1f35944607
commit
ea896da394
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue