Fix for memory leak.

This commit is contained in:
Bruce Momjian 1998-04-05 05:52:10 +00:00
parent 39740d75bd
commit 03a7cd1788
3 changed files with 11 additions and 11 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.12 1998/02/26 04:38:06 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.13 1998/04/05 05:51:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -229,20 +229,20 @@ GetProcessingMode()
* Returns path to database.
*
*/
char *
const char *
GetDatabasePath()
{
return strdup(DatabasePath);
return DatabasePath;
}
/*
* GetDatabaseName --
* Returns name of database.
*/
char *
const char *
GetDatabaseName()
{
return strdup(DatabaseName);
return DatabaseName;
}
void

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.25 1998/02/26 04:38:12 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.26 1998/04/05 05:52:00 momjian Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
@ -195,8 +195,8 @@ VerifySystemDatabase()
static void
VerifyMyDatabase()
{
char *name;
char *myPath;
const char *name;
const char *myPath;
/* Failure reason returned by some function. NULL if no failure */
char *reason;

View File

@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: miscadmin.h,v 1.20 1998/02/26 04:39:48 momjian Exp $
* $Id: miscadmin.h,v 1.21 1998/04/05 05:52:10 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
@ -116,8 +116,8 @@ extern int GetDatabaseInfo(char *name, Oid *owner, char *path);
extern char *ExpandDatabasePath(char *path);
/* now in utils/init/miscinit.c */
extern char *GetDatabasePath(void);
extern char *GetDatabaseName(void);
extern const char *GetDatabasePath(void);
extern const char *GetDatabaseName(void);
extern void SetDatabaseName(char *name);
extern void SetDatabasePath(char *path);
extern char *getpgusername(void);