summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorHeikki Linnakangas2011-05-19 02:30:24 +0000
committerHeikki Linnakangas2011-05-19 02:49:22 +0000
commitea896da394cbb0fb32a4b41065ea04b81c4b03f6 (patch)
treeb8f571651e255b4d8f470230acf1c21dd92e3f67 /contrib
parent1f35944607f1ede7dbb1dc3283d955b96f04ea5e (diff)
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/seg/seg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c
index 8101036cc0e..0a787ff9462 100644
--- a/contrib/seg/seg.c
+++ b/contrib/seg/seg.c
@@ -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)