Fix for memory leak.
This commit is contained in:
parent
39740d75bd
commit
03a7cd1788
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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.
|
* Returns path to database.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
char *
|
const char *
|
||||||
GetDatabasePath()
|
GetDatabasePath()
|
||||||
{
|
{
|
||||||
return strdup(DatabasePath);
|
return DatabasePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetDatabaseName --
|
* GetDatabaseName --
|
||||||
* Returns name of database.
|
* Returns name of database.
|
||||||
*/
|
*/
|
||||||
char *
|
const char *
|
||||||
GetDatabaseName()
|
GetDatabaseName()
|
||||||
{
|
{
|
||||||
return strdup(DatabaseName);
|
return DatabaseName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* InitPostgres() is the function called from PostgresMain
|
* InitPostgres() is the function called from PostgresMain
|
||||||
@ -195,8 +195,8 @@ VerifySystemDatabase()
|
|||||||
static void
|
static void
|
||||||
VerifyMyDatabase()
|
VerifyMyDatabase()
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
char *myPath;
|
const char *myPath;
|
||||||
|
|
||||||
/* Failure reason returned by some function. NULL if no failure */
|
/* Failure reason returned by some function. NULL if no failure */
|
||||||
char *reason;
|
char *reason;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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
|
* NOTES
|
||||||
* some of the information in this file will be moved to
|
* 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);
|
extern char *ExpandDatabasePath(char *path);
|
||||||
|
|
||||||
/* now in utils/init/miscinit.c */
|
/* now in utils/init/miscinit.c */
|
||||||
extern char *GetDatabasePath(void);
|
extern const char *GetDatabasePath(void);
|
||||||
extern char *GetDatabaseName(void);
|
extern const char *GetDatabaseName(void);
|
||||||
extern void SetDatabaseName(char *name);
|
extern void SetDatabaseName(char *name);
|
||||||
extern void SetDatabasePath(char *path);
|
extern void SetDatabasePath(char *path);
|
||||||
extern char *getpgusername(void);
|
extern char *getpgusername(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user