|
11 | 11 | * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
12 | 12 | * Portions Copyright (c) 1994, Regents of the University of California
|
13 | 13 | *
|
14 |
| - * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.56 2009/01/01 17:24:04 momjian Exp $ |
| 14 | + * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.57 2009/01/08 20:09:06 momjian Exp $ |
15 | 15 | *
|
16 | 16 | *-------------------------------------------------------------------------
|
17 | 17 | */
|
@@ -1134,7 +1134,11 @@ get_alternative_expectfile(const char *expectfile, int i)
|
1134 | 1134 | strcpy(tmp,expectfile);
|
1135 | 1135 | last_dot=strrchr(tmp,'.');
|
1136 | 1136 | if (!last_dot)
|
| 1137 | +{ |
| 1138 | +free(tmp); |
| 1139 | +free(s); |
1137 | 1140 | returnNULL;
|
| 1141 | +} |
1138 | 1142 | *last_dot='\0';
|
1139 | 1143 | snprintf(s,ssize,"%s_%d.%s",tmp,i,last_dot+1);
|
1140 | 1144 | free(tmp);
|
|