1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

ecpg: Consistently use mm_strdup()

mm_strdup() is provided to check errors from strdup(), but some places
were failing to use it.
This commit is contained in:
Peter Eisentraut
2013-06-29 22:14:56 -04:00
parent ee6556555b
commit 14a85031b1
3 changed files with 6 additions and 6 deletions

View File

@ -171,7 +171,7 @@ main(int argc, char *const argv[])
regression_mode = true;
break;
case 'o':
output_filename = strdup(optarg);
output_filename = mm_strdup(optarg);
if (strcmp(output_filename, "-") == 0)
yyout = stdout;
else
@ -320,7 +320,7 @@ main(int argc, char *const argv[])
yyout = stdout;
else
{
output_filename = strdup(input_filename);
output_filename = mm_strdup(input_filename);
ptr2ext = strrchr(output_filename, '.');
/* make extension = .c resp. .h */