Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
16e1ae77
Commit
16e1ae77
authored
Nov 24, 2012
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In pg_upgrade, fix a few place that used maloc/free rather than
pg_malloc/pg_free.
parent
bc5430aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
contrib/pg_upgrade/check.c
contrib/pg_upgrade/check.c
+1
-1
contrib/pg_upgrade/file.c
contrib/pg_upgrade/file.c
+4
-4
No files found.
contrib/pg_upgrade/check.c
View file @
16e1ae77
...
@@ -987,7 +987,7 @@ get_canonical_locale_name(int category, const char *locale)
...
@@ -987,7 +987,7 @@ get_canonical_locale_name(int category, const char *locale)
if
(
!
setlocale
(
category
,
save
))
if
(
!
setlocale
(
category
,
save
))
pg_log
(
PG_FATAL
,
"failed to restore old locale
\"
%s
\"\n
"
,
save
);
pg_log
(
PG_FATAL
,
"failed to restore old locale
\"
%s
\"\n
"
,
save
);
free
(
save
);
pg_
free
(
save
);
return
res
;
return
res
;
}
}
contrib/pg_upgrade/file.c
View file @
16e1ae77
...
@@ -148,7 +148,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
...
@@ -148,7 +148,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
return
-
1
;
return
-
1
;
}
}
buffer
=
(
char
*
)
malloc
(
COPY_BUF_SIZE
);
buffer
=
(
char
*
)
pg_
malloc
(
COPY_BUF_SIZE
);
if
(
buffer
==
NULL
)
if
(
buffer
==
NULL
)
{
{
...
@@ -171,7 +171,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
...
@@ -171,7 +171,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
int
save_errno
=
errno
;
int
save_errno
=
errno
;
if
(
buffer
!=
NULL
)
if
(
buffer
!=
NULL
)
free
(
buffer
);
pg_
free
(
buffer
);
if
(
src_fd
!=
0
)
if
(
src_fd
!=
0
)
close
(
src_fd
);
close
(
src_fd
);
...
@@ -194,7 +194,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
...
@@ -194,7 +194,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
int
save_errno
=
errno
?
errno
:
ENOSPC
;
int
save_errno
=
errno
?
errno
:
ENOSPC
;
if
(
buffer
!=
NULL
)
if
(
buffer
!=
NULL
)
free
(
buffer
);
pg_
free
(
buffer
);
if
(
src_fd
!=
0
)
if
(
src_fd
!=
0
)
close
(
src_fd
);
close
(
src_fd
);
...
@@ -208,7 +208,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
...
@@ -208,7 +208,7 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
}
}
if
(
buffer
!=
NULL
)
if
(
buffer
!=
NULL
)
free
(
buffer
);
pg_
free
(
buffer
);
if
(
src_fd
!=
0
)
if
(
src_fd
!=
0
)
close
(
src_fd
);
close
(
src_fd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment