Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f57a2f

Browse files
committed
Replace strdup() with pstrdup(), to avoid leaking memory.
It's been like this since the seg module was introduced, so backpatch to8.2 which is the oldest supported version.
1 parenta7d3110 commit1f57a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎contrib/seg/seg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ restore(char *result, float val, int n)
929929
*p='\0';
930930

931931
/* get the exponent */
932-
mant= (char*)strtok(strdup(result),"e");
932+
mant= (char*)strtok(pstrdup(result),"e");
933933
exp=atoi(strtok(NULL,"e"));
934934

935935
if (exp==0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp